Hi Barbara,
first of all, welcome to the forum
As discussed, e.g. here: Implementing rate constraints and rate costs
It is only possible to couple stages via the dynamics, not via cost and constraints.
One way to implement your kind of cost function is to add a dummy state, which integrates the control input, such that the last value of this state is the sum of the control inputs weighted with the time steps.
Then you can just put a constraint on this state.
Please let me know if that works for you.
Cheers,
Jonathan