Solar Power Inverter
VisSim is used to develop control systems for DC-AC conversion. Here is a complete example of VisSim controlling a Texas Instruments solar power inverter board that takes solar panel DC input. If you are signed in, you may download the source code at the bottom of this page. The VisSim control converts a DC power source like photo voltaic panels or batteries to synchronized AC line voltage. The board consists of a logic section that takes any of TI's C2000 controlCARD series, and a power section that takes 12-20VDC as input, has a PWM-driven DC boost section, followed by three PWM pairs driving a 6-IGBT Intelligent Power Module rated at 450V/20A per phase. A PWM-driven buck section provides voltage- or current-controlled battery charging off the DC bus. There is also circuitry to take 110/220 AC Mains voltage and reduce it to TTL logic levels to obtain a zero cross signal to allow synchronization of the generated AC waveform to the AC mains line. The board also monitors PV input voltage and can activate a relay to switch between PV and battery DC input.
Digital Power Design with VisSim
In just a few hours time, Visual Solutions Technical Services engineers created a working inverter drive based on the F2808 controlCARD. It was accomplished by wiring configureable PWM blocks to pre-built subsystems containing fixed-point 3-phase sin generators, PI controllers, ADC inputs, GPIOs, and a slew rate limiter to control the rate of bus voltage changes. The debug cycle allowed engineers to ensure correct settings and configuration, but it was done at high level, so bugs due to C syntax and missing libraries were not a factor.
Simple Creation of Low-Speed Background Task
With a CTRL+right-click on a subsystem, engineers set the subsystem run rate to a lower value like 100Hz and activated the Codegen as Background Task option. This creates a background task that runs at the desired rate, but is preempted by the main control task. Any blocks placed in the subsystem will run at the specified rate. Typically, supervisory commands on a CAN or UART bus are transmitted and received here, user interface actions, and lower speed operations like voltage slew rate control are done in such a subsystem. The overall control scheme runs at 25kHz with 100Hz background task.
Synchronize ADC with PWM Waveform
Another important consideration is to synchronize the ADC unit with the PWM waveform on the power device being measured. In this kit, the phase voltage sensors are wired to ADC 3 and 4, (both on bank A) so the PWM units controlling the IPM IGBTs are set to send a start-of-conversion bank A pulse (SOCA) when the PWM counter == zero. Since the PWM is set for up/down count, the measurement will be made in the center of the PWM duty cycle.
Waveform Capture for Debugging
For debugging, the U and V phase voltages are written to a 416 element buffer at 25kHz, giving a 16.6ms window: one complete cycle of a 60Hz waveform. The buffer acquisition is triggered by the zero cross of the AC waveform on phase U. The waveform is updated at about 20Hz in a digital scope in VisSim on the PC.
Download VisSim Diagram
The diagram shown here, along with the debug diagram used to display the waveforms on the target and send parameter values to the target can be downloaded below. You must sign in or create an account to see the files.