--- 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.