Reply by urjust2oocool June 9, 20082008-06-09
hi nader chinichian,
Wer u able to control the motor using SVM algorithm,
I had some few doubts on th t algorithm. In the formulae TA,TB
(time), how can we decide on whcih angle to chose.
Rajeev
--- In l..., nader chinichian
wrote:
>
> Thanks a lot for your good help,
> Do you think lpc2378 can out freq about 1000 hz with using SVM
algorithm?
> i do this algorithm on DSP56F800 with 40 MIPS.but this chip is
too expensive and don't have enough GPIO.
>
>
>
> Karl Olsen wrote:
> ---- Original Message ----
> From: "nader chinichian"
> To:
> Sent: Friday, November 17, 2006 4:54 PM
> Subject: Re: [lpc2000] PWM of lpc23xx for SVM Motor Control
>
> > is there any way to sync the start ADC with PWM(when the output
in
> > in high level) i need it for measuring the current.it's
important to
> > take sample in this position.
>
> Check out the ADC chapter in the User Manual. It says that a
conversion can
> be started by software, by some capture and interrupt inputs, and
by some
> timer 0 and 1 match output pins. (It also says that none of those
match
> outputs are pinned out, but according to the pin configuration
chapter, some
> of them are.)
>
> If a conversion should be started exactly at a rising or falling
edge on one
> of the PWM outputs, simply wire that pin to P2.10/EINT0 or
P1.27/CAP0.1, and
> set the ADC start trigger accordingly.
>
> If the ADC start should occur a few clocks after a PWM output
edge, you can
> have the PWM timer generate an interrupt on the right MRx match,
and do a
> software ADC start in the interrupt handler, preferably FIQ. FIQ
> interrupts, and therefore the ADC start, will have a jitter of a
few clocks
> unless you do tricks to eliminate the jitter, see
> http://tech.groups.yahoo.com/group/lpc2000/message/12652
>
> These match outputs refer to timer 0 and 1, not the PWM timer, so
you have
> to run timer 0 (or 1) synchronously with the PWM timer to get
synchronized
> ADC conversions. The easiest way would probably be something like
this:
> - Start timer 0 and PWM timer synchronously
> - Set MR0.1 to the desired ADC sample time
> - Configure timer 0 to set MAT0.1 on MR1 match
> - Configure ADC to start a conversion on MAT0.1 rising edge
> - Configure ADC to generate an interrupt on conversion complete
> - In the ADC handler, process the result, and clear MAT0.1 output
>
> See these messages:
> http://tech.groups.yahoo.com/group/lpc2000/message/18323
> http://tech.groups.yahoo.com/group/lpc2000/message/20003
> http://tech.groups.yahoo.com/group/lpc2000/message/14337
>
> Karl Olsen
>
>
>
>
> ---------------------------------
> Sponsored Link
>
> Mortgage rates as low as 4.625% - $150,000 loan for $579 a
month. Intro-*Terms
>
>
>

An Engineer's Guide to the LPC2100 Series

Reply by nader chinichian November 18, 20062006-11-18
Thanks a lot for your good help,
Do you think lpc2378 can out freq about 1000 hz with using SVM algorithm?
i do this algorithm on DSP56F800 with 40 MIPS.but this chip is too expensive and don't have enough GPIO.

Karl Olsen wrote:
---- Original Message ----
From: "nader chinichian"
To:
Sent: Friday, November 17, 2006 4:54 PM
Subject: Re: [lpc2000] PWM of lpc23xx for SVM Motor Control

> is there any way to sync the start ADC with PWM(when the output in
> in high level) i need it for measuring the current.it's important to
> take sample in this position.

Check out the ADC chapter in the User Manual. It says that a conversion can
be started by software, by some capture and interrupt inputs, and by some
timer 0 and 1 match output pins. (It also says that none of those match
outputs are pinned out, but according to the pin configuration chapter, some
of them are.)

If a conversion should be started exactly at a rising or falling edge on one
of the PWM outputs, simply wire that pin to P2.10/EINT0 or P1.27/CAP0.1, and
set the ADC start trigger accordingly.

If the ADC start should occur a few clocks after a PWM output edge, you can
have the PWM timer generate an interrupt on the right MRx match, and do a
software ADC start in the interrupt handler, preferably FIQ. FIQ
interrupts, and therefore the ADC start, will have a jitter of a few clocks
unless you do tricks to eliminate the jitter, see
http://tech.groups.yahoo.com/group/lpc2000/message/12652

These match outputs refer to timer 0 and 1, not the PWM timer, so you have
to run timer 0 (or 1) synchronously with the PWM timer to get synchronized
ADC conversions. The easiest way would probably be something like this:
- Start timer 0 and PWM timer synchronously
- Set MR0.1 to the desired ADC sample time
- Configure timer 0 to set MAT0.1 on MR1 match
- Configure ADC to start a conversion on MAT0.1 rising edge
- Configure ADC to generate an interrupt on conversion complete
- In the ADC handler, process the result, and clear MAT0.1 output

See these messages:
http://tech.groups.yahoo.com/group/lpc2000/message/18323
http://tech.groups.yahoo.com/group/lpc2000/message/20003
http://tech.groups.yahoo.com/group/lpc2000/message/14337

Karl Olsen

---------------------------------
Sponsored Link

Mortgage rates as low as 4.625% - $150,000 loan for $579 a month. Intro-*Terms
Reply by Karl Olsen November 17, 20062006-11-17
---- Original Message ----
From: "nader chinichian"
To:
Sent: Friday, November 17, 2006 4:54 PM
Subject: Re: [lpc2000] PWM of lpc23xx for SVM Motor Control

> is there any way to sync the start ADC with PWM(when the output in
> in high level) i need it for measuring the current.it's important to
> take sample in this position.

Check out the ADC chapter in the User Manual. It says that a conversion can
be started by software, by some capture and interrupt inputs, and by some
timer 0 and 1 match output pins. (It also says that none of those match
outputs are pinned out, but according to the pin configuration chapter, some
of them are.)

If a conversion should be started exactly at a rising or falling edge on one
of the PWM outputs, simply wire that pin to P2.10/EINT0 or P1.27/CAP0.1, and
set the ADC start trigger accordingly.

If the ADC start should occur a few clocks after a PWM output edge, you can
have the PWM timer generate an interrupt on the right MRx match, and do a
software ADC start in the interrupt handler, preferably FIQ. FIQ
interrupts, and therefore the ADC start, will have a jitter of a few clocks
unless you do tricks to eliminate the jitter, see
http://tech.groups.yahoo.com/group/lpc2000/message/12652

These match outputs refer to timer 0 and 1, not the PWM timer, so you have
to run timer 0 (or 1) synchronously with the PWM timer to get synchronized
ADC conversions. The easiest way would probably be something like this:
- Start timer 0 and PWM timer synchronously
- Set MR0.1 to the desired ADC sample time
- Configure timer 0 to set MAT0.1 on MR1 match
- Configure ADC to start a conversion on MAT0.1 rising edge
- Configure ADC to generate an interrupt on conversion complete
- In the ADC handler, process the result, and clear MAT0.1 output

See these messages:
http://tech.groups.yahoo.com/group/lpc2000/message/18323
http://tech.groups.yahoo.com/group/lpc2000/message/20003
http://tech.groups.yahoo.com/group/lpc2000/message/14337

Karl Olsen
Reply by nader chinichian November 17, 20062006-11-17
thanks a lot for your good help,
is there any way to sync the start ADC with PWM(when the output in in high level)
i need it for measuring the current.it's important to take sample in this position.

Karl Olsen wrote:
---- Original Message ----
From: "naderus2000"
To:
Sent: Wednesday, November 15, 2006 1:55 PM
Subject: [lpc2000] PWM of lpc23xx for SVM Motor Control

> i want to know how can i use the PWM unit of LPC23xx for handle center
> align feature for SVM motor control?
> is there any way to insert some deadtime between PWM's channels?

With double edge controlled mode, you can control each rising and falling
edge of up to three outputs, so you can have any deadtime you want between
the edges.

Karl Olsen

---------------------------------
Sponsored Link

Degrees online in as fast as 1 Yr - MBA, Bachelor's, Master's, Associate - Click now to apply
Reply by Karl Olsen November 15, 20062006-11-15
---- Original Message ----
From: "naderus2000"
To:
Sent: Wednesday, November 15, 2006 1:55 PM
Subject: [lpc2000] PWM of lpc23xx for SVM Motor Control

> i want to know how can i use the PWM unit of LPC23xx for handle center
> align feature for SVM motor control?
> is there any way to insert some deadtime between PWM's channels?

With double edge controlled mode, you can control each rising and falling
edge of up to three outputs, so you can have any deadtime you want between
the edges.

Karl Olsen
Reply by naderus2000 November 15, 20062006-11-15
Hi,
i want to know how can i use the PWM unit of LPC23xx for handle center
align feature for SVM motor control?
is there any way to insert some deadtime between PWM's channels?

Thanks.