| Electronics > Microcontrollers |
| Control and filtering algorithms on a MSP430 |
| (1/3) > >> |
| NiHaoMike:
In my senior design project (exercise bicycle with a grid tie inverter), I have a MSP430G2452 reading the voltage and current from a permanent magnet alternator (with built in rectifier) and using an external DAC (TLC7524) to control the peak current setting of a UC3843 PWM controller. (All of that is on the 12V side.) I'm planning to do high level control like MPPT and energy measurement in the MSP430. Any suggestions for implementing algorithms on a low power microcontroller like the MSP430? I'm particularly looking for noise filters and PID-type control that do not use much memory or CPU. |
| scrat:
I can't help that much... Are you measuring phase values, or is the current/voltage measurement made only after the rectifier? Why did you use an external PWM controller? Is there a position/speed sensor? Searching for IQmath (which is the standard way for implementing fractional numbers calculation on C2000 DSPs) for MSP430, I found this: http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/t/59088.aspx. Here is the one I consider the simplest implementation of an anti-windup PI controller (although it has some problems in the case of very strong noise): |
| NiHaoMike:
The measurements are after the rectifier. The external PWM is because it's a current mode flyback converter. The MSP430 cannot sample the current fast enough for reliable current limiting. And because I'm just starting MSP430 programming, I wanted the hardware to be well protected from software bugs. The maximum current limit is set in hardware and is well below the ratings of the components. The output voltage limiter is also hardware based. |
| scrat:
Besides what are your design choices, this is what I see into industrial drives and photovoltaic inverters. Hardware current limiting is usually done simply as a protection, with a couple of comparators acting on the switch drivers and input to the microcontroller, while current control is done in digital, like the other loops. The control update is done at 10-20kHz, which might be too much for an MSP430 (is it really so?), but are easy to achieve with a C2000 or similar. This gives a large freedom in the design and tuning of filters, controllers and so on. 5kHz can be sufficient for a motor control if there is enough inertia and the electrical frequency is not too high. The real question I wanted to ask you was if the rectifier is a thyristor bridge or a MOS/IGBT one. In the second case, synchronous control would be an option. Excuse me for the unsolicited info, but this is my research field, and I'm glad to speak about it :) |
| NiHaoMike:
The rectifier is just a simple diode bridge built into the alternator. Just like a car alternator except the rotor is a permanent magnet. The ADC built into the MSP430 can do up to 200ksps, so sampling two channels (voltage and current) cuts it down to 100kHz max. The PWM is running at about 50kHz, so it would not be possible to implement the entire loop in the MSP430. Instead, the MSP430 uses a DAC to set the peak current level of the 3843. Having that update at 1kHz would be enough and measuring the voltage and current at 1kHz would also be enough. The inverter would have a separate control circuit. It would be completely separate from the DC/DC converter I'm working on right now since I'm looking to make the system highly flexible for different applications. |
| Navigation |
| Message Index |
| Next page |