02-02-2017 02:00 AM
I want to generate a staircase waveform whose edges have been smoothened ? How do I do that?? Should I just use a filter at the output of a stair case generator or there are other efficient ways? The waveform should be somewhat as shown in the attached file. Please advise
Solved! Go to Solution.
02-02-2017 02:35 AM
Hi biswa,
the plot looks like several steps with an exponential decay.
You might build up your waveform using some simple math functions…
02-02-2017 02:45 AM
It looks like a simple first order low-pass filter can do the job. If could be an analog or a digital filter depending on your hardware setup.
If you want to calculate the waveform (the digital filter approach) you can first create your ideal staircase waveform and then pass it through for example a first order digital Butterworth lowpass filter.
If you go for the analog approach a simple Resistor-Capacitor (RC) lowpass filter can do the trick.
02-02-2017 03:03 AM
Attached herewith is a VI which might give you a perspective of what I am trying to achieve. I have incorporated the filter as you have mentioned but there seems to be glitch in the signal type. I will need something to convert the dynamic data to double it seems.
02-02-2017 03:37 AM
I have attached a VI that shows an easy way to design your waveform using array concatenation and the Butterworth filter VI. The VI shows both simple array and waveform data type (WDT) options.
02-02-2017 03:44 AM
I would like to smoothen the edges of a staircase signal which is generated in the attached VI. Please suggest me a suitable lowpass filter that would smoothen the edges without leading to violation of the signal types.
02-02-2017 04:14 AM
02-02-2017 04:31 AM
If you want to filter your signals point-by-point use the Butterworth pbp filter in the Signal Processing -Point by Point - Filter palette. Remember to set the order to 1 to avoid overshoot (the default value is second order).
02-02-2017 08:32 AM
Thank You for the support. I have been able to use your idea to use your idea to my advantage. I have attached the VI where I have used the filter within the control design and simulation loop because I am eventually going to use it for a set-point tracking of a plant.
02-02-2017 08:47 AM
You've connected your cut-off frequency value to the high cutoff freq input of your filter VI, it should be connected to the low cutoff freq input instead.
Right now the used cut-off frequency is the default value of 0.125.