Hi Everyone,
I am trying to generate a PWM signal with a triangle wave made with Labview FPGA and an input sine wave from a Simulink model. The triangle wave is created using a counter. But I've ran into some problems or would like some clarification on why these instances occur.
When I generate the triangle wave before implementing the Interrupt IRQ for the FPGA model, it is fine but the signal is distorted after I add the interrupt.
However, when I checked the analog output, I am able to get a triangle wave:
but only I set the peak to peak amplitude to 20 on my model input and an offset of -10. If i don't have an offset of -10 (triangle wave [0,20]), then there's a cutoff. I'm curious if that has to do something with the coercion dot at the analog output when inputting an I16 value.
If I increase or decrease the triangle wave amplitude, I get some distortion and if I continue to increase the value, the peaks start to saturate:
I am curious on how I can change these values without having any distortions or can the triangle wave I made only be operated on an amplitude of 20 and an offset of -10.
Lastly, the sine wave (from the Simulink model) generates, with the IRQ, a step-wise signal of the sine wave for the analog output. I am curious about the cause of this.
Thank you for your time!