gate signal changes in more than 100 consecutive simulation steps.

At t=0.00582970394839264685: Encountered gate signal changes in more than 100 consecutive simulation steps. This will slow down the simulation.
Please check the gate signals that are imported from Simulink into this Signal Inport and ensure that they change only at discrete instants.

You can turn off this message by setting the circuit parameter MaxConsecutiveGateSignalChanges to 0.At t=0.00582970394839264685: Encountered gate signal changes in more than 100 consecutive simulation steps. This will slow down the simulation.
Please check the gate signals that are imported from Simulink into this Signal Inport and ensure that they change only at discrete instants.

You can turn off this message by setting the circuit parameter MaxConsecutiveGateSignalChanges to 0.

How to solve this?

Thanks in advance.

Based on the error there is likely a problem in your modulator and/or controller. As the error message indicates, the gate signal is changing every simulation time step.

Look at the PWM output of your controller and see if there are multiple gate changes within a switching period. Make sure your modulation index input does not change faster than your carrier signal.

You will receive a more concrete answer if you post your model.

Thanks Bryan Lieblick for your respone.

I have solved the problem. There was a problem with the Discrete state space type.