You are on page 1of 8

Model Based Control Design Using SLPS Simulink PSpice Interface

Saeid Moslehpour
#1,#2,#3 #1

Member, IEEE, Ercan K. Kulcu

#2

and Hisham Alnajjar

#3

Department of Electrical and Computer Engineering University of Hartford, West Hartford, CT, USA
#1

moslehpou@hartford.edu #2 kulcu@hartford.edu #3 alnajjar@hartford.edu

AbstractThis paper elaborates on the new integration offered


with the PSpice SLPS interface and the MATLAB simulink products. SLPS links the two widely used design products, PSpice and Mathworks Simulink simulator. The SLPS simulation environment supports the substitution of an actual electronic block with an ideal model, better known as the mathematical simulink model. Thus enabling the designer to identify and correct integration issues of electronics within a system. Moreover, stress audit can be performed by using the PSpice smoke analysis which helps to verify whether the components are working within the manufacturers safe operating limits. It is invaluable since many companies design and test the electronics separately from the system level. Therefore, integrations usually are not discovered until the prototype level, causing critical time delays in getting a product to the market. The system chosen in this case is a model based design of ambulatory rehabilitation suspension system. Ambulatory suspension system [1] is an apparatus that is utilized for the purpose of helping patients during gait rehabilitation and provides safety support during exercise. The device can lift a patient from a sitting position in a wheel chair to a standing position, has the provisions to remove a percentage of the patients body weight and recognize subtle changes in the elevation. This model was used for mathematical and electrical comparison using the SLPS interface. Index Terms Design and test in Simulink, Mathematical PSpice Model, Analog PSpice model, SLPS modeling, Comparison of SLPS and Simulink Output.

which can save time and money that may otherwise be spent in debugging trial boards within system designs. With the PSpice Smoke option, designers can perform a stress audit to verify that electrical components are operating within the manufactures safe operating limits or de-rated limits. Model Based Control Design of Ambulatory Rehabilitation Suspension System and Observer Design for Control System applications are used for testing SLPS software. Model Based Control Design of Ambulatory Rehabilitation System is ongoing research and development in the area of assisted ambulatory rehabilitation at the University of Hartford. Different types of ambulatory system design are studied at the University of Hartford. By each new design, system became better and more efficient. These researches are improved now by using a model-based control design for Ambulatory Suspension System. This prototype provides electrical motion to the X, Y and Z axis. The system allows for large vertical displacement and effortless walking for the patient. The system also provides fall prevention and ensures safety for the patients. Competition between companies and engineers motivate them to produce faster machines with smaller components. Moreover, increasing fuel costs and government regulations require higher efficiency for businesses. This means that companies need higher performing control systems. Thus, Model-based control design provides a solution.

II. DESCRIPTION
I.

INTRODUCTION

The PSpice SLPS simulation environment supports the substitution of an actual simulink block with an equivalent analog PSpice electrical circuit. It allows co-simulation with Matlab and Simulink and thereby enables the designer to identify and correct integration issues of electronics within a system. This helps identify errors earlier in the design process,

Model based control design consists of the following four phases; 1) Developing and analyzing a model to describe a plant. 2) Designing and analyzing a controller for the dynamic systems 3) Simulating the dynamic system, and 4) Developing the controller

K. Elleithy (ed.), Advanced Techniques in Computing Sciences and Software Engineering, DOI 10.1007/978-90-481-3660-5_88, Springer Science+Business Media B.V. 2010

MOSLEHPOUR ET AL.

Control design is a process which involves developing mathematical models that describe a physical system. It analyzes the models to learn about their dynamic characteristics, and creates a controller to achieve certain dynamic characteristics. Control systems contain components that direct, command, and regulate the physical system, also known as the plant. In this setting, the control system refers to the sensors, the controller, and the actuators. Two types of controllers are used for such systems. These are respectively called, open-loop controller and the closedloop controller. A closed loop controller is shown in Figure 1.

Fig.2- Y Axis Variables of the System Fig. 1 Closed-loop Control System

The controller operates to make sure that there is no direct connection between the output of the system and input. The open-loop controller is often used in simple processes because of its lack of complexity, especially in systems where feedback is not critical. Nevertheless, to obtain a more accurate or more adaptive control, it is necessary to feed the output of the system back to the inputs of the controller. This type of system is called a closed-loop controller. Ambulatory control systems purpose is to control the motion of the carriage. This means to observe the patients horizontal movements in maximum accuracy. Independent analysis for each axis is made by using the same tools as well as the same modeling logic. The Ambulatory system is shown in Fig. 2. When the carrier moves in a way that keeps the angle at a minimum value the control system activates the motor. Tilt sensor measures the control variable (), the control algorithm C(s) processes the difference or error. [2] Control system parameters are given as: F ; Lifting Force, L ; Length of Cable, Y ; Carriage Position, Y ;Walking Distance ; Tilted Angle, H(s) ; Tilt Sensor, C(s) ; Control Algorithm G(s) ; System of Motor Belt Carrier, PWM ; Output Amplifier

The Control system block diagram is given in Fig.3 above.

Figure -3 Control System Block Diagram

The input of the closed-loop system is zero and main feedback of the system is provided by the tilt sensor. Fy provides mechanical feedback for inner loop. The specific values of the parameters of the plant model were gathered by experimental estimation, and the data is used to design Simulink and PSpice model. Also, the transfer function of the plant is designed by using the data. . Transfer function of the plant is given as follows.

The block diagram of the plant is given in Fig. 4 below.

MODEL BASED CONTROL DESIGN USING SLPS SIMULINK PSpice INTERFACE

III. PROCEDURE A. DESIGN AND TEST IN SIMULINK Fig. 5 is a screenshot of the simulink model of the system

Fig. 4- Block Diagram of the Plant

Fig. 5-Simulink Model of the System

Simulink simulates the system plant, sensor, and the other components by using mathematical blocks. Motor-Belt-Load system is created as a subsystem. As a Tilt Sensor Block, H(s) function is used and the PWM is replaced by its gain A = 28.32. Values of F and L are considered with constant values L =

1.2 m (3.9 ft), and F = 180.5 N. These values are considered average values of the patients. In the simulation program, all values are designed for average patients. The proportional gain Kp is set to 0.4, and the derivative gain Kd was set to 0.04. The simulink model for the plant or Sub Model is shown below in Fig. 6[2] [3]

MOSLEHPOUR ET AL.

Fig. 6- Simulink Model of the Sub-model or Plant

Furthermore, the angle is measured from the simulation and step response of the system is shown in Fig. 7

Figure -16. This model contains the same components which are transfer function, gain, sum, integrator and differentiator in PSpice. However, blocks names and shapes are different than the Simulink model. VSRC input source is used to give step pulse. The ABM library model is given below in Fig. 7.

Fig. 7- PSpice ABM Library Model of the System Fig. 6-Simulink Output of the System

Maximum value of step response is around 1.25 and step response becomes stable after 6 seconds. B. MATHEMATICAL PSPICE MODEL The Mathematical PSpice model is constructed using the ABM library. Analog behavioral modeling feature of Pspice are used to make flexible descriptions of electronic components in term of transfer function or lookup table. In other words, a mathematical relationship is used to model a circuit segment [4]. PSpice ABM library model is designed by using the same structure used in Simulink as it is shown in

Output of the PSpice is the same with Simulink output. PSpice ABM contains mathematical model of gain, sum, integrator, transfer functions, and differentiator; therefore, Simulink and PSpice models give the same result and graph. Fig. 8 shows the sub Model.

MODEL BASED CONTROL DESIGN USING SLPS SIMULINK PSpice INTERFACE

Fig. 8- PSpice ABM Library Model of the Sub-model

Maximum value of the step response is a little bit different than the Simulink output. The output is shown in Fig. 9 below

Fig.9- PSpice ABM Library Output

C. ANALOG PSPICE MODEL Ideal Op-Amp models are used to design analog circuits. Gain, integrator, differentiator, sum, and the transfer function models are replaced by using ideal Op-Amp circuit [5]. PSpice analog circuit is shown in Fig.10.

Fig. 10-PSpice Analog Model of the System. The peak value of the step response is close to 1.4 V. This peak value is different than Simulink and PSpice ABM model. Moreover, step response of the analog output is more oscillating than the other outputs. Furthermore, step response

of analog model becomes stable after 7 seconds. However, step responses of other models become stable after 6 seconds. Testing analog circuit is similar to real environmental parameters such as real parts, delay time, heat, smoke options, and metal losses. Therefore, output of the electronic model has a dissimilar response. However, the ideal model does not have

MOSLEHPOUR ET AL.
run, these differences can be completely comprehended.

these kinds of losses or effects because it just uses the mathematical model of the parts. When SLPS is tested and

Fig. 11- PSpice Analog Circuit of the Plant

D. SLPS MODELLING. SLPS is a Simulink library; however, this library is unlike than real Simulink library files. Therefore, the designer has to set the current directory of Matlab to the work directory where PSpice files are saved. SLPS library (slpslib) is called from the Matlab command window, as shown below in Fig.-12 [6].

Here, only the file trana.cir is listed and, therefore, it is automatically selected. Input and output source are selected for desired inputs and outputs. If voltage source is selected, the input data will be set to circuit as a voltage value, and if a current source is selected, it will be supplied as a current value. The input sources are listed here as V1 and V2. This circuit does not have a current source. As a result, only V2 is selected as an input for containing step signal.

Fig. 12-SLPS Library

SLPS library can be used for designing a model now. The Simulink model of SLPS contains three blocks which are step source, SLPS block and scope. Step source is used for an input and it is set at a 0.1 second delay to get the same input in the PSpice model. Scope is used for displaying output of the model. SLPS model is shown in Fig. 13. The setting window is opened by double-clicking on the SLPS block as shown in Fig. 14. When a project is designed, ambulatory control files included in the project are listed as PSpice Circuit File; thus, designate the file to be used [7].

Fig. 13-Simulink Model of SLPS

MODEL BASED CONTROL DESIGN USING SLPS SIMULINK PSpice INTERFACE

Fig.15-Output of the SLPS Fig. 14-SLPS Setting

When the output select button is pressed, all output variables in the file are listed. N557082 node is selected as a desired output for this application because this node is used for output in the PSpice circuit. After completing of SLPS setting, simulation time is entered at 8 seconds. When this model is run, Figure -28 occurs. This output is the same as the output of the analog model. Nonetheless, despite the similarity, we need to look at the dissimilarities rather than the ideal (mathematical) model.

E. COMPARISON OF SLPS AND SIMULINK OUTPUT This comparison is shown in Fig. 16.

Figure -1 Comparisons of the SLPS and Simulink Outputs (The left scope is SLPS output, whereas the right one is Simulink)

When the two step responses are compared, the differences between Simulink and SLPS can be easily captured. These are the peak value of the signal, oscillating of the signal shape and the stability time.

As it can be easily seen in this Fig, the ideal and electronic model behavior is different. One of them has the peak value of the signals in that while SLPS peak value is close to 1.4 Volts, the peak value of the ideal model is close to 1.3 Volts. There is 0.1 Volts difference between these models. Secondly, SLPS signal shape is bigger and sharper than the ideal model. Furthermore, stability time of SLPS becomes after 7 seconds,

MOSLEHPOUR ET AL.
This application is more powerful example for testing SLPS and it applications presents an opportunity to better understand the SLPS software due to the fact that each application has different outputs and problems. Consequently, this makes it easier to have a deeper insight into the similarities and dissimilarities along with the causes that lie behind them. What seems to be a serious problem is that designers have to use one SLPS block for each model. REFERENCES
[1] [2] [3] [4] [5] [6] [7] D. Shetty, C. Campana, Ambulatory Rehabilitation System, Presented at the International ASMI Congress, November 2003, Washington DC. O. Aksoy, Model-based Control Design and Optimization for the Ambulatory Suspension System , University of Hartford, 2007 U. Arifoglu, 2005, Simulink and Engineering Applications, Alfa Co. Cadence Design Systems, PSpice User Guide, June 2003, pp. 257-308 A. M. Davis, 1998, Linear Circuit Analysis, PWS Publishing Company , pp. 189-205 EMA Design and Automation. PSpice MATLAB/Simulink Interface (Accessed May 10, 2007) http://www.ema-eda.com/products/orcad/tech.matlabsimulink.aspx. Cybernet Systems Co.,Ltd. PSpice SLPS Interface Version 2.60 Users November 2004, pp. 9-34

whereas stability time of the ideal model is reached after 6 seconds. Thus, there is a 1 second difference between SLPS and ideal model. These differences demonstrate that the analog model have one second delay and some losses. These are due to the fact that analog model uses real parts and parameters. Hence, it is possible to grasp the ideal and real model behaviors to improve the circuit efficiency. IV. CONCLUSION SLPS is efficient and a useful software for testing and comparing the ideal and the real output of a circuit. It offers a significant opportunity to use people the most common product in the industry. The user can identify and correct integration issues of electronics within a system. This helps to identify errors earlier in the design process, which can save time and money often spent in debugging trial boards within system designs. Like any other new software, SLPS has some problems and incomplete aspects. Therefore, SLPS software should be tested by using a different application such as Model-based Control Design of Ambulatory Rehabilitation Suspension System.

You might also like