11-14-2016 05:21 PM
dear sir/ madam
i am working to create a half wave with variables as amplitude, time, pulse duration
formula is a/2 * (1-cos (2 * pi *t)/pulse duration)
but i am not successful in it
any help will be appreciatable
Kind regaards
Armghan Zafar
Solved! Go to Solution.
11-15-2016 06:30 AM
Your question should be moved to the LabVIEW forum, as this question is not related to Signal Conditioning hardware.
Are you sure about the formula? It seems not to make much sense as:
- a/2 scales the amplitude. This sounds right as 'a' is usually the variable for 'amplitude'. However, why divide it by 2?
- (1-cos(2pi * t)) is a cosine with an offset of 1 and 180 degree phase shift. (1-cos(0) = 0; 1-cos(pi/2)=1; 1-cos(pi)=2; 1-cos(2pi/3)=1; ...)
- "pulse duration" is a divider of the cosine signal. Again this is simply scaling
I recommend you to explain/post a picture of a signal you expect to generate by the VI.
Norbert
11-15-2016 07:23 AM
dear nobert i am sure with that formula is correct because i had checked it with in mathematica and it is working on my friend program in mathematica. it is is used in mass spring system. yes u are right it is nothing but scaling. only purpose is to change the duration of pulse and sometime amplitude.
but important thing is to use this same formula because i have to use it in driving the full function.
Kind regards
Armghan Zafar
11-15-2016 07:41 AM
I am not convinced about that formula....
However, this is what could be similar to what you are looking into:
Is that what you are looking for?
Norbert
11-15-2016 07:53 AM
Dear sir
formula is not from me its from running system
yes it is the same what i need and has three variables Fmax, T,Pulse time
11-15-2016 09:23 AM
I strongly recommend to rename the three variable values. These could be better names:
- Amplitude
- Delta t
- Number of Samples
Please note that renaming is only reasonable if you also change the formula.
However, attached an example which i used to create the screenshot. The VI is written in LV 2016.
Note the following constraints:
1. Amplitude is not the effective maximum amplitude. That is because Pulse Duration (1:1) and Amplitude (1:2) effect the maximum amplitude of the signal. I highly recommend to keep Pulse Duration at '1' at any time and only modify Amplitude (factor by 2) to modify the amplitude of the signal.
2. Pulse Duration has NO EFFECT on the width of the signal. Therefore, the label is highly misleading and has to be renamed for proper usage. This also applies to the formula! Recommendation: Keep this one at '1' all time when chosing not to change formula/labels.
3. 'T' is a result of Number of Samples * Delta t. Delta t defines the granularity/resolution of your signal. Number of Samples combined with Delta t defines the length of the signal (that means: pulse duration!). If Number of Samples * Delta t = 1, you will always get the signal shown in previous screenshot.
Norbert
11-15-2016 04:13 PM
thank u very much for your great help
here is the other solution
kind regards
Armghan zafar