There’s a reason “The Simpsons” has managed to stay fresh throughout its run (27 seasons and counting): the ability to mix it up every once in a while and try something new.

This will be evident in the final three minutes of Sunday night’s episode, “Simprovised,” when Homer Simpson (voiced by Dan Castellaneta) will appear “live” to answer fans’ questions.

“The Simpsons” executive producer Al Jean tells The Post about how those three minutes will unfold — and about the technical ingredients that went into making the animated Homer interact with his human fans.

How is this going to work?

We’ll have our normally good episode up to the last three minutes — and then we take a flight into the unknown. Homer is going to be animated by motion-capture [technology] — Dan [Castellenata] is going to be in another room speaking into a microphone, and his motions will be recorded by a camera and immediately animated. There are no electrodes; this is a more advanced process. We used it once before, on “The Tonight Show” (in 2007) to promote “The Simpsons” movie, but it was a lot more iffy then. The technology is better now — the way [Homer] moves and looks — and we’ll have background animation.

Will Homer answer questions from viewers?

What Homer does and says will be live. He will answer phone calls from viewers and speak on events of the day. We’ll do two [of the live three-minute segments], one for the East Coast and one for the West Coast. We’re screening the phone calls and there are rules: You have to be over 18 and we’re not going to take questions about specific seasons of “The Simpsons.” And there will be a seven-second delay. [Referring to infamous “Howard Stern Show” prank calls:] We won’t have a “Baba-Booey” incident. We don’t want dead air so we hope we have lots of callers. And maybe something amazing will happen on Sunday that Homer can refer to when he’s live.

Is this the hardest three minutes of “The Simpsons” you’ve ever done?

Yes. Coordinating phone lines, getting clearances … it’s all very complicated, but on the other hand, Dan is solid as a rock, and it will be great for people to get to see him do his thing.

Was there a longer production time for this episode?

There’s more post-production for this. And we have a fail-safe version in case there’s a power failure in LA on Sunday — so we have a full show ready to go just in case.

Is this episode more costly than the standard “Simpsons” episode?

Yeah, though Fox Sports has been really helpful with the motion capture stuff. And once you have that [computer] program, it’s cheaper than three minutes of conventional animation. Money is not a huge issue.

Could we see more of this sort of thing in the future on “The Simpsons” if it works out?

You could, but put it this way: I’m a big fan of the hand-drawn animation we’ve got on the show, and I don’t see that changing. We might [do this again] … but one thing we’re conscious of, as we approach 600 episodes, is that we don’t want to repeat ourselves. We did a “Futurama” crossover episode, which we enjoyed, but I don’t think we would do another. We really try not to repeat ourselves, as much as we can do that after having done so many episodes.

Here’s why we did this: Because we can and because we’re “The Simpsons” and everyone is working to make this show the best we can make it. “The Simpsons” is a tremendous resource.

“The Simpsons” airs at 8 p.m. Sunday on Fox.