Support Articles

Support Articles Modelling and Simulation Rapid Evaluation of an Electrical Load Controller

Rapid Evaluation of an Electrical Load Controller

Chris de Villiers from Psitek describes how he used the MathWorks Tools for the Rapid Evaluation of an Electrical Load Controller

Contents

 

It is well-known that a significant portion of the morning and evening peak loads imposed on the national electricity supply grid is due to current being drawn by the resistive heating elements in Electrical Storage Water Heaters (ESWH). This occurs when hot water is withdrawn from the tank, and cold water enters the tank. The peaks exceed the installed peak demand capacity of the grid at these times, while at other times there exists ample, under-utilized capacity. A number of local electricity suppliers employ demand side management (DSM) in an attempt to shift the peaks by remotely controlling power to groups of ESWHs.

The South African technology company, Psitek (Pty) Ltd., was approached by an inventor with a patented design for an ESWH controller, with a view to development and commercialization of a new product. The main features of the design were autonomous operation, low cost and ease of installation.

The Problem

"Being presented with a design that appears feasible on paper, is not the same as developing that design into a feasible commercial product," says de Villiers. "Although Psitek has a good record of rapid concept-to-prototype development, the Electrical Load Controller (ELC) was different. Quickly putting together the hardware would be easy - we have the expertise and resources to do that. The problem was, how do we evaluate the system?".

Real-world evaluation of the ELC would require a large number of prototype field trial units, invasive installation in an equal number of houses, appropriate instrumentation and a long period of testing and data logging. The total cost of such a project would be considerable, and the delay to a final conclusion would be unacceptably long.

Psitek needed to know whether the design was feasible before any further decisions could be made, and the cost implications and delays associated with field testing were not attractive.

The Solution

It was decided to use MATLAB and related MathWorks tools to model, simulate and analyze typical installations comprising the ELC and standard ESWHs in houses, under varying conditions of ambient temperature and hot water withdrawal volumes.

"I was given a tight budget and a limited time period in which to do the job," says de Villiers. "But I had access to the necessary tools: MATLAB, Simulink and StateFlow."

The overall system model was divided into three sub-models:

  • A deterministic model of the ESWH that took into account heat conduction, forced convection and natural convection.
  • A stochastic model of domestic hot water withdrawal based on results of a South African study reported in the literature.
  • A finite-state model of the ELC.

 

A powerful feature of Simulink is the ability to create S-function blocks that utilize custom C-code. The ESWH block was modeled as a reservoir, divided into a number of equal control volumes. Thermal conduction and forced convection were modeled as appropriate thermal resistances between control volumes and the surrounding air. Natural convection was modeled by stratified mixing of the control volumes. The resulting tridiagonal system of differential equations was solved by means of an algorithm implemented in C code that formed the core of the ESWH S-function block in Simulink.

Modeling of hot water withdrawal was best implemented as a MATLAB m-file. This model allowed the number of persons per household, the purpose for which hot water was withdrawn, and the volume and rate of withdrawal to be randomly selected for each simulation run according to a predefined probability function. Output data from this model were placed in an array in the workspace and made available to Simulink as a 'From Workspace' block. The ELC was modeled as a StateFlow block in the Simulink model.

Overall control of the simulation was managed by a second m-file that defined parameters and variables such as simulation run length, number of trials, ambient temperature, thermostat hysteresis and various settings of the ELC. "By using Simulink, we were able to simulate the system with and without the ELC for various expected real-life conditions," explains de Villiers. "The data generated by Simulink were then analyzed and plotted with the aid of standard MATLAB functions."

The Result

Expected performance confirmed The simulations not only demonstrated qualitatively that the ELC performed as claimed by its designer, but provided a quantitative measure of how well it could be expected to perform. Psitek therefore obtained more information than was originally asked for, at the same cost.

Reusable models The models that were created for this project may now be used as a basis for further investigations and even for presentations. In addition, once a decision has been made to develop and commercialize the invention, it is a simple matter to modify the original model for use in the development process.

Power of model based design demonstrated "The concept of model based design is unfamiliar territory for most engineers at Psitek," says de Villiers. "This project demonstrated the cost effectiveness of MBD using MATLAB tools."