Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17249 Discussions

Integrate speed signal to obtain angle signal

Altera_Forum
Honored Contributor II
1,288 Views

Dear all,  

 

In simulation, I obtained electric machine speed signal wr. I need to integrate the speed signal wr through each period to obtain the angle signal in the range of [0 360] electric degree range.  

 

Can someone give me a hand on how to implement it in Modelsim? 

 

Thanks!
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
581 Views

 

--- Quote Start ---  

Dear all,  

 

In simulation, I obtained electric machine speed signal wr. I need to integrate the speed signal wr through each period to obtain the angle signal in the range of [0 360] electric degree range.  

 

Can someone give me a hand on how to implement it in Modelsim? 

 

Thanks! 

--- Quote End ---  

 

 

if you get your speed value regularly every say 1 second and you get speed vector say [300 500 100 700 200 ...] degrees/sec  

then the total degrees at measurement time= 300+500+100+700+200+...  

to wrap the degrees over 360 degrees then your adder must be modulo 360. 

i.e. if final adder result > 360 then subtract 360 and retest until it is equal to or less than 360.
0 Kudos
Reply