Forums

ADC output and Reference Sinewave in TMS320LF2407A processor

Started by tselvi4u May 4, 2006
Hi all,

       I am doing a project of DSP based on-line UPS(Inverter stage) using
TMS320LF2407 processor with C language. I have done this in open loop. Now
i am trying in closed loop. In this closed loop, the reference sine wave
and ADC output will be compared. I have generated the reference sinewave
in code composer studio using C program. I have given 2.56V via
transformer to ADC. I have seen the ADC output in DAC. The DAC output is
pure sine wave. If i compare these two wave forms (reference sine wave and
ADC output), I didnt get the proper sine wave output. I think these two
waveforms are not synchronized. Please suggest me how to synchronize the
ADC output (real time) and reference sine wave (non real time)?

                                          Thanks & Regards
                                           Tamilselvi.P













tselvi4u wrote:
> Hi all, > > I am doing a project of DSP based on-line UPS(Inverter stage) using > TMS320LF2407 processor with C language. I have done this in open loop. Now > i am trying in closed loop. In this closed loop, the reference sine wave > and ADC output will be compared. I have generated the reference sinewave > in code composer studio using C program. I have given 2.56V via > transformer to ADC. I have seen the ADC output in DAC. The DAC output is > pure sine wave. If i compare these two wave forms (reference sine wave and > ADC output), I didnt get the proper sine wave output. I think these two > waveforms are not synchronized. Please suggest me how to synchronize the > ADC output (real time) and reference sine wave (non real time)? > > Thanks & Regards > Tamilselvi.P >
First, if your reference sine wave is being compared at the same rate as the intended output then it _is_ real time. Second, what sort of output _did_ you get? If it wasn't sinusoidal then there's something going on other than the waveforms not being synchronized. If you got a sinusoid at the correct frequency but phase shifted then yes, you have a synchronization problem. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/
>tselvi4u wrote: >> Hi all, >> >> I am doing a project of DSP based on-line UPS(Inverter stage)
using
>> TMS320LF2407 processor with C language. I have done this in open loop.
Now
>> i am trying in closed loop. In this closed loop, the reference sine
wave
>> and ADC output will be compared. I have generated the reference
sinewave
>> in code composer studio using C program. I have given 2.56V via >> transformer to ADC. I have seen the ADC output in DAC. The DAC output
is
>> pure sine wave. If i compare these two wave forms (reference sine wave
and
>> ADC output), I didnt get the proper sine wave output. I think these
two
>> waveforms are not synchronized. Please suggest me how to synchronize
the
>> ADC output (real time) and reference sine wave (non real time)? >> >> Thanks & Regards >> Tamilselvi.P >> > >First, if your reference sine wave is being compared at the same rate as
>the intended output then it _is_ real time. > >Second, what sort of output _did_ you get? If it wasn't sinusoidal then
>there's something going on other than the waveforms not being >synchronized. If you got a sinusoid at the correct frequency but phase >shifted then yes, you have a synchronization problem.
Thankyou for your prompt reply. I have generated the reference sine wave at 50Hz using the following C program. for(t=0.0,i=0;i<=60;t=t+.00033,i++) { sinn[i]=sin((2*pi*fr*t)); co1=sinn[i]; co2=co1+1.0; /*to convert from bipolar to unipolar*/ co2=co2/2; Output=co2; The processor accepts only unipolar wave. So I have changed bipolar to unipolar. So the reference sine wave takes the starting vaue 75 (instead of 0)and it goes upto 150(the one cycle order is 75,150,75,0,75). If I run this ref sine wave it will increment the value in regular (75,77,79,81,83.........149)order.If everytime running It will always takes the first value is 75. Then I have given 2.5V to ADC. The DAC sine wave output is also 50Hz. If every time I run the ADC wave means it takes the different values.Because it is real time.The value varies between 0 to 120. So If I compare(output=ref-ADC)these two signals means I didnt get the proper sine wave output. Little bit time the sinewave is coming, because on that time the reference sine wave value is high compared to ADC. If the ADC valus is greater than the sine wave means the output is not sinusoidal. Please help me How to generate the proper sinewave output?
> > >-- > >Tim Wescott >Wescott Design Services >http://www.wescottdesign.com > >Posting from Google? See http://cfaj.freeshell.org/google/ >