MATLAB: How to generate a pwm signal with duty cycle 30%
pwm with simulink without using source blockssimulink
How to generate a pwm signal with duty cycle 30% without using any of the source blocks.
Want to use the simulink library but not the blocks present in the sources
Best Answer
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.
you can use a normal Pulse generator block in Simulink and use set_param command to set any of the parameters like Amplitude, Period, PulseWidth, PhaseDelay, SampleTime etc.
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.
Best Answer