Fusion energy is an appealing option for future energy generation, but also presents unique design challenges. The UK Atomic Energy Authority is leading the Spherical Tokamak for Energy Production (STEP) programme to build a fusion power plant capable of net electricity generation. This work addresses the use of dynamic models in an optimization framework for the design of the thermal power generation cycle for STEP. The optimization of a proportional-integral-derivative controller regulating the power output of a steam Rankine cycle with a coupled thermal energy storage system is presented. A lumped-parameter dynamic model of the system has been implemented. The effectiveness of a controller design is evaluated by simulating the system under a perturbation to the power demand on the system. By minimizing the mean absolute power deviation, there is a reduction of 97 % compared to the initial controller design, as well as a reduction of 95 % in the maximum absolute power deviation and a faster return to setpoint. The optimized design does introduce more oscillations in the system, which are undesirable for control systems and are challenging for the optimization procedure.