my probleme : i have sinsoidal signal the maximum valeur is 1 V and the minimum is 0.7V .
i can't use Relay block to generate signal PWM
Best Answer
You mean you have y=a*sin(t), 0.7<a<1? To derive a PWM signal from a sinusoidal wave based on its magnitude, you just need to compare it with a constant. In your case, try to use a Relational Operator block to compare the sinusoidal wave with constant 0.8 and see what is the output of the Relational Operator block.
Sorry, I can't write in French, but hopefully you can use a tool to get a reasonable translation:
SimElectronics uses the SimScape foundation to enable physical modeling in the Simulink domain - the signals that connect between such blocks are called physical signals. You cannot directly connect physical signals directly to regular Simulink signals, but must use conversion blocks to achieve the interface. Please seeConnecting Simscape Diagrams to Simulink Sources and Scopes for more information.
Use a resetable integrator to generate a sawtooth wave, compare it with a constant value, you'll get a PWM wave. The value of the constant determines the duty cycle.
Best Answer