A power supply comprises a control unit for adjusting a power output by the power control unit in response to a control signal. The power supply further includes a processing unit configured to generate the control signal using a control model and based at least on one or more sensor signals supplied to the processing unit. The processing unit is configured to communicate via an interface with an external processing entity to receive a data set for generating the control model and/or to receive the control model, and/or to transmit the model to the external processing entity.