As the sparkling smiles of the Strictly Come Dancing winners fade from the screen on Saturday evening, the first people to know just how engrossed the British public were will be a team of engineers in a secret and secure location west of London. "We can tell how much an event is gripping the nation," says Nigel Williams, head of electricity systems operations at the National Grid.

His team plan for weeks ahead so that when the nation heaves itself off the sofa and puts the kettle on, power stations across the country burst into life within seconds to stop the surge in electricity demand turning the lights off. In the national control centre, a cross between space mission control and a city trading floor, one man will watch the live television feed with his finger hovering over the button.

Even in today's multi-channel, time-shifting world of entertainment, these "TV pickups" remain the biggest challenge for the grid engineers in balancing the electricity grid from second to second. The largest number on the huge display screens in the control room is the frequency of the electricity supply, which must remain very close to 50 hertz. "That frequency is the heartbeat of the nation," says Williams.

The hour-by-hour pulse of the electrical signal also reveals how traditional most Brits remain when it comes to Christmas itself. "People's behaviour always surprises me in that it is so predictable," says Williams. "You get exactly the same curve on Christmas day, year after year after year."

The usual workday surge in the morning disappears, replaced by a slow rise towards the lunchtime peak as millions of turkeys are roasted in ovens. Boxing day morning is also a notable day for the grid engineers, representing the most peaceful national moment of the year. "It's the lowest of the low," he says.

However, one tradition has been lost, according to Jeremy Caplin, energy forecasting manager at the National Grid. "There used to be a pickup for the Queen's speech, but not so much now," he says. A physicist by training, Caplin has had to become an expert on TV schedules and thinks the BBC's Strictly final is likely to be the biggest spike of the festive period. He also has to track soap plotlines, having been caught napping by a massive TV pickup after the siege

in Emmerdale in October.

Other surprises this year included The Day of the Doctor in November, which won a big audience but resulted in no grid surge. "Either the programmes after grabbed people's attention or Doctor Who fans don't drink coffee," he says.

Natalie Gumede and Artem Chigvintsev performing during rehearsals for Strictly Come Dancing. Photograph: Guy Levy/BBC/PA

The biggest challenge of the year was Andy Murray's triumph at Wimbledon. "It's impossible to predict how many sets the match would go to or when it was going to end," he says.

The size of the TV pickups, exacerbated because the nation's inactivity during the event causes a trough before the peak, can be huge: equivalent to the entire electricity use of London.

While TV pickups are the biggest variable second to second, the key factor determining the peak electricity use for the day is the weather. But even there people's behaviour matters: the "misery factor" is important, says Caplin. For example, if it is windy or raining, people coming home chilled and wet whack up the heating more than if it was the same temperature outside but clear-skied. "There is an underlying science – we know the impact of weather – but there is an element of judgment too," he says.

Preventing the nation's fairy lights going out can take 1,000 balancing actions a day, says Williams, but the increasing use of intermittent renewable energy is not a problem.

"When we first got wind on the grid we had a few choppy days, but we are managing it very well now," he says. "Our forecasting is very good."

The grid gets useful wind forecasts 10 days ahead, and 24 hours ahead can predict the amount of electricity that will be generated to within 4%. Earlier in December, a wind power record was set of 6GW – equivalent to six big power stations and 14% of all electricity at the time – and the grid then managed a 2.5GW dropoff over a few hours as winds surpassed safety limits in many places.

"I don't see an upper limit to how much wind we can accommodate [on the grid]", says Williams, who also notes that 86% of payments to companies to stop generating when the grid is getting overloaded go to coal and gas, not wind. National Grid, whose charges make up about 4% of electricity bills, has also seen the traditional evening lighting peak lowered by the widespread use of low energy bulbs.

Overall, says Williams, "we like a nice balanced portfolio of generation sources, so if you have trouble in the Ukraine or a miners' strike, you can deal with it."

He said the huge new nuclear power stations being planned would provide significant, stable power but were not essential: "You could do without nuclear as long as you get the volume [of electricity] from elsewhere." He said the much larger size of the new reactors incurred more costs to the grid, as they have to increase the capacity to hand to ensure the network would cope if the reactors tripped offline.

Williams described the recent warnings of blackouts made by energy company bosses as scaremongering. "We have always had periods when there is a bit of a crunch and we have managed that," he says. "People talk about winters of discontent and blackouts, but what we are talking about in the worst-case scenario is a few half-hour periods a year. It's most likely we'd reduce the frequency a bit, so lights would dim a little and hairdryers would be a little less hot. Most people would not notice."

While the National Grid has to anticipate people's behaviour to keep the lights on, in particular predict TV hits, it does not mean its staff always agrees with the audience's choices. "The TV pickup from Deal or No Deal is gobsmackingly high," said Williams. "How sad is that?"

• This article was amended on 26 June 2014. An earlier version contained an error in the quote by Nigel Williams: "...who also notes that 98% of payments to companies to stop generating when the grid is getting overloaded go to coal and gas, not wind". This has been corrected.