UNIVERSITY OF SOUTHAMPTON FACULTY OF ENGINEERING AND PHYSICAL SCIENCES School of Electronics and Computer Science Hardware Architectures of Control Algorithms for Cyber-physical Systems Model Identification by Charan Kumar Vala Thesis for the degree of Doctor of Philosophy June 2021
165
Embed
Hardware Architectures of Control Algorithms for Cyber ...
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
UNIVERSITY OF SOUTHAMPTON
FACULTY OF ENGINEERING AND PHYSICAL SCIENCES
School of Electronics and Computer Science
Hardware Architectures of Control Algorithms for Cyber-physical
6.1.2 An investigation to MMAE reconfigurable architecture with par-ticular focus on exploring trade-offs between the architecture useof resources area and time . . . . . . . . . . . . . . . . . . . . . . 119
6.1.3 EMMSAC based controller for Buck converter . . . . . . . . . . . . 121
A FPGA implementation SDC file 123
B Boost converter circuit parameter comparison 125
References 129
References 129
List of Figures
1.1 General structure of cyber-physical system (Source [1]) . . . . . . . . . . . 1
1.2 Envisaged Cyber-physical system with estimation based multiple modeladaptive control, where (u2, y2)T are the measured signals, (u0, y0)T arethe external disturbances and (u1, y1)T are the original signals at the inputand output of a physical system (Pp∗) respectively . . . . . . . . . . . . . 2
2.13 Execution of function y = (a&b)||!c on CLB (Source [3]) . . . . . . . . . . 35
3.1 Proposed architecture for MMAE based LTI model identification. Eachmodel represents the deterministic Kalman filter with a particular statespace matrices. Here (u2, y2)T are the measured signals, (u0, y0)T are theexternal disturbances and (u1, y1)T are the original signals at the input andoutput signals of a physical system (Pp∗) respectively. The cyber compo-nent design also corresponds to the MMAE part in Figure 1.2 shown inchapter 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.4 Multiplications reduction using the proposed hardware architecture: com-parison for 1 to 64 models (Note: Number of multipliers used in theproposed architecture are even less than the number of multiplicationsrequired) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.5 (a) Proposed multiple model estimation based model identification archi-tecture: deterministic Kalman filter architecture, (b) residuals, argmin,comparator and model selection . . . . . . . . . . . . . . . . . . . . . . . 46
xi
xii LIST OF FIGURES
3.6 Deterministic Kalman filter detailed architecture for computing Xpestimate
and Σpestimate recursively, in parallel n similar architectures for N models
are used compute the parameters. The numbers correspond to the linenumbers in Algorithm− 1 . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.8 Experimental setup for the LTI model identification architecture validation 51
3.9 (a) Shows the identified model by the proposed architecture when modelsswitched for every 3µs and (b) switched for every 6µs . . . . . . . . . . . 52
3.10 FPGA power consumption results for 16 models between the directlymapped and proposed architecture . . . . . . . . . . . . . . . . . . . . . . 55
3.11 FPGA power consumption results for 32 models between the directlymapped and proposed architecture . . . . . . . . . . . . . . . . . . . . . . 55
3.12 FPGA power consumption results for 64 models between the directlymapped architecture and proposed architecture . . . . . . . . . . . . . . . 56
3.13 LUTs and FFs resource utilization of the proposed LTI MMAE architec-ture for number of models 1 to 1024 . . . . . . . . . . . . . . . . . . . . . 57
3.14 DSPs utilization of the proposed LTI MMAE architecture for number ofmodels 1 to 1024 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3.15 Power consumption of the proposed LTI MMAE architecture for numberof models 1 to 1024 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3.16 Comparison between the original data and regression analysis data forLUT utilization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.17 Comparison between the original data and regression analysis data forFF utilization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.18 Comparison between the original data and regression analysis data forFF utilization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.7 The boost converter circuit diagram. When the PWM signal is 1, theMOSFET acts as a closed switch (S = 1) giving rise to the left-handcircuit. When the PWM signal is 0, the MOSFET acts as a closed switch(S = 0) giving rise to the right-hand circuit . . . . . . . . . . . . . . . . . 73
LIST OF FIGURES xiii
4.8 The detailed block diagram of the boost converter model identification, 1depicts the accurate model of the boost converter and 2 shows the MMAEblock diagram in Fig. 4.1, where N is the number of models. The PWMdetermines whether the top or bottom circuit is switched into the systemat any time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
4.10 Model identification comparison between the original model and identifiedby the proposed architecture with load resistance as an uncertain param-eter, load started with R1 = 5Ω and changed to R3 = 15Ω at 52msec,R2 = 10Ω at 104msec, R4 = 42Ω at 156msec and at 208msec R5 = 102Ω 77
4.11 Residuals plot for the 5 model MMAE architecture with residuals windowsize 500 where Resn= residuals for corresponding model number . . . . . 77
4.16 Model-1 (5Ω) and Model-3 (15Ω) residuals comparison for various windowsizes, where Res200, Res500 and Res800 represents the residuals with win-dow size of 200, 500, 800 respectively. T1 = 52.9msec, T2 = 53.55msecand T3 = 54.25msec, load is switched from M1 to M2 at 52msec timeinstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
4.17 Estimated voltage using the proposed architecture when load changingfrom 5Ω to 15Ω, where Vmeasured represents the measured output voltagefrom boost converter, M1 − V1 and M2 − V2 represents estimated voltageby using model-1 with 5Ω load and model-2 with 15Ω load respectively . . 83
4.18 Estimated voltage using the proposed architecture when load changingfrom 42Ω to 102Ω, where Vmeasured represents the measured output volt-age from boost converter, M4 − V4 and M5 − V5 represents estimatedvoltage by using model-4 with 42Ω load and model-5 with 102Ω loadrespectively . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
4.19 Resource utilization of look-up tables for various number of models from1 to 256 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
4.20 Resource utilization of flip-flops for various number of models from 1 to256 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
4.21 Resource utilization of DSPs for various number of models from 1 to 256 86
4.22 Power consumption analysis for various number of models from 1 to 256 86
4.23 Detailed power reduction comparison between eight and four multiplierversion filter bank for 190 models MMAE at operating frequency of 100MHz.An eight and four multipliers version architecture takes 10 and 15 clockcycles respectively . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
xiv LIST OF FIGURES
5.1 Block diagram of the proposed multiple model adaptive estimation basedcontrol of boost converter, where DKF1, DKF2,−−−DKFN representsthe deterministic Kalman filter which estimates output voltage of theboost converter for various load resistance values, N is the number ofload resistors, D is the switching delay . . . . . . . . . . . . . . . . . . . 93
5.3 Comparison between the proposed methodology and PID controller in-terms of boost converter out voltage and PWM duty cycle, when loadchanged from 25Ω to 8Ω and 8Ω to 55Ω. Benchmark-A1: Rload=8Ω(Model -1), Rload=25Ω (Model-2), Rload=55 Ω (Model-3). Total simula-tion time 0-200msec, initially boost converter stared with load 25Ω, attime instance 50msec load changed to 8Ω and at 100msec load changedto 55Ω. Plots for Benchmark A10 were given in appendix B . . . . . . . 100
5.4 Residuals plots for the 3 model EMMSAC based boost converter. WhereRn represents the residuals for model n. Rload=8Ω (Model -1), Rload=25Ω(Model-2), Rload=55 Ω (Model-3). Total simulation time 0-200msec, ini-tially boost converter stared with load 25Ω, at time instance 50msec loadchanged to 8Ω and at 100msec load changed to 55Ω (same graph fromtime 100msec to 200msec is shown in Figure 5.5) . . . . . . . . . . . . . . 102
5.5 Residuals plots for the 3 model EMMSAC based boost converter to ob-serve the residuals window impact on final residuals values between 100msecto 200msec time (same graph from time 0 to 200msec is also shown inFigure 5.4), where Rn represents the residuals for model n. Rload=8Ω(Model -1), Rload=25Ω (Model-2) and Rload=55Ω (Model-3). Total simu-lation time 0-200msec, initially boost converter stared with load 25Ω, attime instance 50msec load changed to 8Ω and at 100msec load changedto 55Ω . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
5.6 Benchmark-B: 5 model based EMMSAC closed loop comparison betweenthe proposed methodology and PID controller in-terms boost converterout voltage and PWM signal, Vin = 5V and Vout = 10V. initially EMM-SAC PID PWM are started with default PWM duty cycle 0.30. Loadresistance (Rload) changes from 10Ω to 30Ω at 50msec, 30Ω to 8Ω at100msec, 8Ω to 85Ω at 150msec and 85Ω to 15Ω at 230msec . . . . . . . 104
5.7 Plot to show the effect of EMMSAC when wrong controller activated,when load changes from 25Ω to 8Ω and 8Ω to 55Ω. Benchmark-A1:Rload=8Ω (Model -1), Rload=25Ω (Model-2), Rload=55 Ω (Model-3). To-tal simulation time 0-200msec, initially boost converter stared with load25Ω, at time instance 50msec load changed to 8Ω and at 100msec loadchanged to 55Ω . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
5.16 Plot to show the real-time measured and estimated voltages for the modelidentification when model changed from system-1 to system-2, whereVmeasured represents the measured boost converter output voltage, V1 rep-resents estimated voltage by model-1 and V2 represents estimated voltageby model-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
5.17 Plot to show the real-time measured and estimated voltages for the modelidentification when the model changed from system-2 to system-1. whereVmeasured represents the measured boost converter output voltage, V1 rep-resents estimated voltage by model-1 and V2 represents estimated voltageby model-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
5.18 Residuals and model identification plots with load resistance 33Ω, whenthe system changed from 1 to 2. At time instance 32.77msec systemchanged from 1 to 2, after 0.31msec time EMMSAC identified the changein model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
5.19 Residuals and model identification plots with load resistance 33Ω, whenthe system changed from 2 to 1. At time instance 32.77msec systemchanged from 1 to 2, after 0.32msec time EMMSAC identified the changein model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
5.20 Plots to show the time difference between the original model (OM) andidentified model (IM) when physical system changed from 1 to 2 underload resistance Rload 33Ω, 40Ω, 50Ω, 60Ω, 68Ω, 89Ω and 100Ω. Modelidentification time 0.32, 0.32, 0.31, 0.32, 0.31, 0.32 and 0.31msec respec-tively for aforementioned load resistances . . . . . . . . . . . . . . . . . . 114
5.21 Plots to show the time difference between the original model (OM) andidentified model (IM) when physical system changed from 1 to 2 underload resistance Rload =33Ω, 40Ω, 50Ω, 60Ω, 68Ω, 89Ω and 100Ω. Modelidentification time 0.31, 0.32, 0.32, 0.31, 0.31, 0.30 and 0.31msec respec-tively for aforementioned load resistances . . . . . . . . . . . . . . . . . . 115
6.1 Illustration of reconfigurable multiple model adaptive estimation . . . . . 120
B.1 Comparison between the proposed methodology and PID controller in-terms boost converter out voltage and PWM duty cycle, when loadchanges from 30Ω to 8Ω and 8Ω to 60Ω. Benchmark-A1: Rload=8Ω(Model -1), Rload=30Ω (Model-2), Rload=60 Ω (Model-3). Total simu-lation time 0-200msec, initially boost converter stared with load 30Ω, attime instance 50msec load changed to 8Ω and at 100msec load changedto 60Ω . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
B.2 Residuals plots for 3 model EMMSAC based boost converter. Where Rnrepresents the residuals for model n. Rload=8Ω (Model-1), Rload=30Ω(Model-2), Rload=60 Ω (Model-3). Total simulation time 0-200msec, ini-tially boost converter stared with load 30Ω, at time instance 50msec loadchanged to 8Ω and at 100msec load changed to 60Ω . . . . . . . . . . . . 127
List of Tables
3.1 Comparison between the MMAE algorithm (Shown in algorithm-1) andproposed hardware modules in terms of the number of multiplications.Where sub-module 1-7 are associated with DKF, N= Number of models,n= number of states to be estimated, No. of mul=Number of multiplica-tions, H.W.A= Hardware architecture . . . . . . . . . . . . . . . . . . . . 46
3.2 Reusable multiplier operation. Kp=Kalman gain, AI=abs(Innovation)and SM=Sub module OTM=Output to the sub-module . . . . . . . . . . 49
3.3 Module wise breakdown of the FPGA resource utilization of the proposedLTI model identification architecture . . . . . . . . . . . . . . . . . . . . . 51
3.4 Resource utilization comparison in-terms of LUT between the proposedarchitectures with respect to the model size. Directly mapped = Directlymapping of the MMAE algorithm without a reduction in multiplications, 51
3.5 Resource utilization comparison in-terms of FF between the proposedarchitectures with respect to the model size. Directly mapped = Directlymapping of the MMAE algorithm without a reduction in multiplications,Proposed = proposed architecture, % percentage with respect to the totalavailable resources on VCU118-FPGA . . . . . . . . . . . . . . . . . . . . 53
3.6 Resource utilization comparison in-terms of DSP and power, between theproposed architectures with respect to the model size. Directly mapped =Directly mapping of the MMAE algorithm without a reduction in multi-plications, Proposed = proposed architecture, % percentage with respectto the total available resources on VCU118-FPGA . . . . . . . . . . . . . 53
3.7 Resource utilization comparison in-terms of power between the proposedarchitectures with respect to the model size. Directly mapped = Directlymapping of MMAE algorithm without a reduction in multiplications, Pro-posed = proposed architecture, % percentage with respect to the totalavailable resources on VCU118-FPGA . . . . . . . . . . . . . . . . . . . . 53
4.1 Total number of multiplication operations in model identification archi-tecture, N= Number of models, n= number of states to be estimated, No.of mul= Number of multiplications . . . . . . . . . . . . . . . . . . . . . . 67
4.2 Multiplier version-1 input data, where cx is the control bit and mulx isthe multiplier number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
4.3 Multiplier version-2 input data, where cx is the control bit and mulx isthe multiplier number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
4.5 Steady state output voltage for the test loads with the 10kHz and 70%duty cycle PWM signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
4.6 Proposed architecture detailed model identification time for case study-1 . 80
xvii
xviii LIST OF TABLES
4.7 Proposed architecture LTV model identification average time . . . . . . . 84
4.8 Resource utilization comparison between 8 and 4 multipliers based ar-chitecture for single DKF, where mul= multiplier and Nclk is number ofclock cycles required for each DKF iteration . . . . . . . . . . . . . . . . . 84
4.9 Resource utilization comparison in-terms of LUTs between eight multipli-ers (8-mul) and four multipliers (4-mul) based architectures with respectto the model size (N). Where N= number of DKF models in MMAE,†=estimated LUT resources and percentage % with respect to the totalnumber of available resources on Virtex ultra scale+ FPGA . . . . . . . . 87
4.10 Resource utilization comparison in-terms of FFs between eight multipli-ers (8-mul) and four multipliers (4-mul) based architectures with respectto the model size (N). Where N= number of DKF models in MMAE,†=estimated FF resources and percentage % with respect to the totalnumber of available resources on Virtex ultra scale+ FPGA . . . . . . . . 87
4.11 Resource utilization comparison in-terms of DSPs between the 8 multipli-ers (8-mul) and four multipliers (4-mul) based architectures with respectto the model size (N). Where N= number of DKF models in MMAE,†=estimated DPSs and percentage % is with respect to the total numberof available resources on Virtex ultra scale+ FPGA . . . . . . . . . . . . . 88
4.12 Power consumption comparison between the 8 multipliers (8-mul) and 4multipliers (4-mul) based architectures with respect to the model size.Where N= number of DKF models in MMAE, †=estimated power andpercentage % is with respect to the total number of available resourceson Virtex ultra scale+ FPGA . . . . . . . . . . . . . . . . . . . . . . . . . 88
4.13 BRAM utilization for the 8 multipliers (8-mul) based and 4 multipliers (4-mul) architectures with respect to the model size. Where N= number ofDKF models in MMAE, % is with respect to the total number of availableresources on Virtex ultra scale+ FPGA . . . . . . . . . . . . . . . . . . . 88
5.1 The controller set PWM values for boost converter with various loadresistances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
My heartfelt gratitude to all my friends and peers in the VLSI, control and power
electronics community whose contributions in big and little ways to this fascinating field
have laid the foundations of this thesis.
I am grateful to my supervisors Prof. Mark French for giving me research freedom,
proposing interesting ideas, providing invaluable suggestions and being a patient mentor
throughout my PhD and Prof. Bashir M. Al-Hashimi for his direction and advice at
many times, for providing me with an opportunity to undertake this research and I
am inspired by his research vision and devotion to work, this PhD project would not
have been possible without his supports and encouragement. I also extend my thanks
to the School of Electronics and Computer Science, the University of Southampton
for providing state-of-the-art research facilities. Thanks to Prof. Geoff Merrett, Kath
Kerr and Jo Axtell for their kind administrative and logistics support. I would also
like to thank Dr. Amit Acharyya for always providing me with career guidance and
support. Many thanks also go to the Engineering and Physical Sciences Research Council
(EPSRC) for financially supporting me throughout the PhD.
I am grateful to the Southampton Sai family who made me feel at home even miles
away from my home. I would like to thank you my friend Dr. Satyanarayana Katla
for engaging in philosophical conversations during tea break times. Further, my sincere
thanks to all my friends who have always been there to help and for making my stay in
Southampton a pleasant memory. In this regard, I would like to mention a few notable
names who are part of our regular discussions at tea breaks sessions: Dr. Karunakar
reddy, Amin Sabet, Samuel Isuwa, Jie Zhan, Edward Longman, Lei Xun, Dr. Amit
Singh, Dr. Oktay Cetinkaya, Dr. Dominic Balsamo, Dr. Charlie leech, and Dr. Alberto
R. Arreola. Thanks to all members of the CPS group for creating an attractive and
vibrant research environment for thought-provoking discussions and knowledge sharing.
Finally, I would like to express my warmest gratitude to my mother Nirmala Vala, to
my father Srinivasulu vala, to my brother Sharath-Aswini, and to my sister Swapna-
Venkatesh for everything that they have done, and continue to do, for me. I would not
be who or where I am today without their encouragement and support.
xix
Abbreviations
ADC Analog to digital converterAFM Atomic force microscopeCS Chip selectCCM Continuous conduction modeCPS Cyber-physical systemsDKF Deterministic Kalman filterDSP Digital signal processing unitDAC Digital to analog converterDCM Discontinuous conduction modeEMMSAC Estimation-based multiple-model switched adaptive controlESR Equivalent series resistorFDI Fault detection and isolationFPGA Field programmable gate arrayFF Flip flopsGPU Graphics processing unitHDL Hardware description languageHEV Hybrid electric vehicleILA Integrated logic analyserILC Iterative learning controlLTI Linear time invariantLTV Linear time variantLHC Large hadron colliderLUT Look up tableMA Moving average filterMI Model identificationMIMO Multiple-input multiple-outputMMAC Multiple-model adaptive controlMMAE Multiple-model adaptive estimationODE23 MATLAB ordinary differential equation solverOWT Offshore wind turbinesPID Proportional integral differentiatePWM Pulse width modulatorSOC Self organizing controlSPI Serial peripheral interfaceSISO Single-input single-output
xxi
Nomenclature
δ Gap metric
∆ Transition delay function
D Delay operator
Mp Graph of Pp
E Disturbance estimator (operator)
fclk Operating frquency
h Step size
In Innovation
iL Inductor current
ki Switching time
ks(k) Last switching time up to time k
n Number of states
N Number of models
Nas Average number of samples
Nclk Number of clock cycles
Nts Total number of samples
Ok Ongoing switching times up to time k
Pk Position of vehicle
Pp∗ Physical system
q Switching signal
qf Free undelayed switching signal
Rload Load resistance
S Switching operator
Sclk System clock
ωn Uncertain natural frequency
u0 Physical system input disturbance
u1 Physical system input after disturbance u0
u2 Controller output
Vc Capacitor voltage
x(t) n-dimensional vector denotes the state of the system
y0 Physical system disturbance
y1 Physical system output before disturbance y0
xxiii
xxiv NOMENCLATURE
y2 Physical system measured output
Vk Velocity of vehicle
Chapter 1
Introduction
1.1 Motivation
Cyber-physical systems (CPS) integrate computing and communication capabilities with
monitoring and control of entities in the physical world [1]. These systems are usually
composed of a set of networked agents, including sensors, actuators, control processing
units, and communication devices, as shown in Figure 1.1. Research into and applica-
tions of CPS are receiving interest worldwide because of the many benefits they offer,
such as responding to highly uncertain working environments so that efficient operation
and use of resources may be achieved. Applications of CPS include high confidence
medical devices and systems [6], smart homes [7], safety, advanced automotive systems
[8], process control, energy conservation, environmental control, avionics [9], instru-
mentation, critical infrastructure control (such as electric power, water resources, and
fence systems, manufacturing, and smart structures [12, 13, 14, 15]. A typical challenge
Figure 1.1: General structure of cyber-physical system (Source [1])
1
2 Chapter 1 Introduction
Sensor
MMAE(Bank of Kalman
filters)
1
2…
N
Controller selection
1
2…
N
Network
Cyber Space
Actuator
Physical System
PhysicalPlant (Pp*)
𝑢0 𝑦0
++− −𝑢2 𝑢1 𝑦1 𝑦2
P1 P2 PN-1 PN
Network
Figure 1.2: Envisaged Cyber-physical system with estimation based multiplemodel adaptive control, where (u2, y2)T are the measured signals, (u0, y0)T arethe external disturbances and (u1, y1)T are the original signals at the input andoutput of a physical system (Pp∗) respectively
of control theory in all the applications mentioned is to design a control policy which
ensures that the CPS feedback loop remains stable under both model mismatch and ex-
ternal disturbances. Conventional non-adaptive controllers, including PID (proportional
integral differential) controller, robust control (H1 etc.), and optimal control with its im-
plementation as model predictive control (non-adaptive MPC), can tolerate both small
modelling inaccuracies (resulting from simplified, idealised physical system models and
uncertainty) and the existence of external disturbances applied to the system. As the
physical system uncertainty increases, the performance of the control system degrades
[16].
To overcome these challenges in CPS, a potential candidate is an advanced control
approach based on multiple model adaptive estimation (MMAE), called an estimation-
based multiple-model switched adaptive control (EMMSAC) [17, 18, 19, 2, 20, 21, 22].
EMMSAC involves selecting several models that could potentially represent the true
physical system, and determining the control signal based on their respective perfor-
mances, as determined by some measure of fit to the observed closed-loop signal. Gen-
erally, EMMSAC algorithms have the same basic structure shown in Figure 1.2. The
chosen N physical system models are collectively referred to as the physical system
model set, P1, P2...PN. For each model, Pp 1 6 p 6 N , a controller Cp is designed,
which is a member of the controller set, C1, C2, ...CN. The resulting physical system-
controller pairs, [Pp, Cp], are required to exhibit closed-loop stability. The main problem
Chapter 1 Introduction 3
associated with continuously-tuned algorithms is that, if the uncertain physical system
is parametrised over a non-convex set, it could lead to dangerous destabilising effects.
This problem does not arise when implementing EMMSAC schemes because the phys-
ical system models are pre-selected, which provides the ability to jump between any
of the corresponding controllers without exiting the parametrisation region. However,
due to the computational complexity issues, EMMSAC is still out of reach for real-time
applications, and its applicability to a wide range of CPS applications has yet to be ad-
dressed. In addition to software improvements, recent developments in computational
and communication technologies have increased the capabilities of embedded real-time
platforms, which potentially increases the scope of application of EMMSAC. Exploiting
hardware architecture for EMMSAC potentially allows the achievement of the best pos-
sible performance for the given computational resources. However, improvement of the
closed-loop performance cannot be considered as the only design objective.
From the hardware point of view, the most computational complexity of EMMSAC is
associated with the multiple model adaptive estimation (MMAE) which uses a bank of
Kalman filters for estimation. For a physical system with two states, if the controller
bank uses a typical adaptive PID controller set, 94% and 6% of multiplications are
associated with the MMAE filer bank and controller set respectively1. In practice, there
is a trade-off between performance and computational resource usage. Resources that are
required to perform computations include performance, power and area (PPA), which
are also the functions of the EMMSAC algorithm and hardware platform. Therefore, this
thesis focuses on efficient hardware architecture design and implementation for MMAE-
based linear time-invariant (LTI) and linear time-variant (LTV) model identification.
The following metrics are used to evaluate the designs:
1. Area: This is the number of configurable logic blocks (CLB), flip flops (FF) and
DSP units on the FPGA used by the design.
2. Clock speed: This is the maximum speed achievable by the hardware design. As
one fixed point value enters the design during each clock cycle, the design is able
to handle incoming data at clock speed bits/s. In this thesis, autonomous vehicle
application requires 70ns sample rate with the operating frequency of 100MHz and
power electronic application requires 5us sample rate with the operating frequency
of 100MHz.
3. Total time: Ideally this is the period of time between the arrival of the first input
and the output of the last result. However, this thesis considers model identifica-
tion time and closed-loop control time.
1A physical system with n-states required (1 + 3n+ 4n2 + 3n3) number of multiplications in Kalmanfilter and 3 multiplications in PID controller.
4 Chapter 1 Introduction
4. Throughput: This is computed as (total number of outputs)/(output time). The
output time is the period between generating the first result and outputting the
last result. For applications that generate input sets sequentially for reduction,
high throughput is more desirable than short latency. Thus, when multiple sets
are reduced, throughput is a better measurement of performance than total time.
1.2 Application selection
Recently, systems and control researchers have pioneered the development of powerful
system science and engineering methods and tools, such as time and frequency domain
methods, state-space analysis, system identification, filtering, prediction, optimisation,
robust control, stochastic control, optimal control [23], and multiple model adaptive
control [21, 24], to increase the performance of physical systems in the presence of un-
certainties. However, these algorithms must be adapted for real-time application to
achieve better performance. The applicability of these algorithms to emerging applica-
tions, like power electronics, health care, robotics etc., to improve their performance,
also needs to be investigated.
A few attempts have been made to use MMAE for applications such as estimation of
position and velocity states [25], atomic force microscope control [26], control of func-
tional electrical stimulation [20, 27, 28], MMAE extension to iterative learning control
[29] and its application for human movement assistance [30], power electronics [31, 32],
fault detection and isolation for power electronics devices [33] and batteries [34], state
of charge estimation for batteries [35, 36, 37], high speed train control [38], gas turbine
control [39], and control in nuclear power plants [40].
Nevertheless, control and systems science are choosing applications from a range of
established theoretical techniques to provide solutions involving both simulation and
technology demonstration. To accomplish this, a flexible and rapid prototyping and
benchmarking hardware environment are needed for investigating features such as scaling
the number of models and performance trade-offs of MMAE.
Bearing this in mind, autonomous vehicle application and power electronics DC-DC
boost converter applications have been chosen in this thesis for validating MMAE-based
LTI and LTV model identification architecture. The autonomous vehicle application was
not chosen to be potentially realistic as the experiment operates on far faster timescales
for switching than the real world, but to illustrate the methodology and implementation
before using them for a realistic example of a power electronics application in a later
chapter.
Chapter 1 Introduction 5
The LTV power electronics application DC-DC boost converter provides flexible, rapid
prototyping and benchmarking. Moreover, it has a wide range applications, such as pho-
tovoltaic (PV) power systems [41], offshore wind turbines (OWT) [42], electric/hybrid
Function y is doing an OR operation on a AND b with !c. This could be designed in way
shown in Figure 2.13. FPGAs also have DSP units to perform multiplication operations
Figure 2.13: Execution of function y = (a&b)||!c on CLB (Source [3])
efficiently with the lesser area. Overall, an FPGA allows the user to implement compu-
tational units according to the requirements of the algorithm, unlike CPUs which have
a fixed pipeline architecture. By hardwiring a particular algorithm into an FPGA, the
36 Chapter 2 Adaptive Control in Cyber Physical Systems and Computing Platforms
highest level of customisability can be achieved. Moreover, by using dedicated hardware
architecture for executing only one algorithm, redundant speculative circuits burning
power unnecessarily can avoided completely.
Because the FPGA be be easily reconfigured, non-recurring engineering costs are smaller
than the application-specific integrated circuit, while FPGA is preferred for smaller pro-
duction requirements. The leading FPGA suppliers are Xilinx, Altera, and Microsemi.
Hardware design flows rely on slow error-prone tools that require low-level hardware
expertise. FPGAs are traditionally programmed using hardware description languages
such as VHDL or Verilog [93]. FPGAs are also used in signal processing and healthcare
applications to meet resource constraints and power requirements [94].
Recent advances in the fields of machine learning, artificial intelligence, and computer
vision have tremendously increased the demand for high-speed hardware accelerators.
This has resulted in the FPGA becoming the primary choice in the design of dedicated
hardware for deep neural networks (DNNs) [95, 96, 97], and stereo vision [98, 99, 100].
to meet real time performance requirements. Global communication networks are one of
the major application areas of FPGAs due to their high throughput requirements [101].
They are also used for demanding radar, and have become common for implementing
simple control loops with very tight real-time requirements [102].
In general, FPGA enables particular algorithms to be mapped onto hardware, and thus
can achieve maximal computational efficiency. Moreover, hardware implementations
have cycle-accurate predictable timing, which is a significant advantage for guaranteeing
tight real-time deadlines. Thus, FPGAs are the most suitable platform for optimal
decision-making and control, in resource-constrained applications [103].
Floating-point operations remain expensive to implement in FPGAs, mainly because
there is no hard support in the FPGA architecture to facilitate the normalisation and
de-normalisation operations required before and after every floating-point addition or
subtraction [104]. Therefore, this thesis considers only fixed-point implementation using
the Xilinx Virtex ultra scale plus FPGA [105], programmed with a Vivado-2018.2 tool
[106].
2.9 Discussion
This chapter presented an overview of classical adaptive control algorithms and mul-
tiple model adaptive control literature and its historical developments. The features
associated with MMAC algorithms were given in detail. The recently proposed estima-
tion based multiple model switched adaptive control algorithm was discussed in detail.
Details regarding the estimation and switching processes were provided, with specific
focus given to the Kalman filter implementation as the estimator. MMAE-based CPS
Chapter 2 Adaptive Control in Cyber Physical Systems and Computing Platforms 37
applications were also addressed. This concluded that MMAE based algorithms could
be applied to real-time resource-constrained applications.
An insight was given into various hardware implementation platforms, such as CPUs,
DSPs, GPUs, and FPGAs. These limitations of CPU and DSP platforms for imple-
menting MMAE algorithms were outlined. The advantages of FPGA platforms over
other platforms for implementing the multiple model adaptive estimation algorithms
were addressed.
The literature review of control algorithms suggested that MMAE should be chosen as
the model identification scheme for both LTI and LTV systems. The shortcomings of
the CPU, microcontroller, DSP, and GPUs for meeting real-time deadlines and resource
requirements were highlighted To overcome these limitations, the alternative solution
identified was direct mapping of MMAE model identification algorithms onto an FPGA.
Chapter 3
Hardware Architecture for Linear
Time Invariant System Model
Identification
The literature review presented in the last chapter motivated us to design a hardware
architecture for MMAE based model identification algorithm. This chapter considers a
hardware architecture for the implementation of the MMAE based LTI model identi-
fication, with an objective to demonstrate architecture which can implement the large
number of filters whilst meeting real time constraints. As discussed in chapter 2, EMM-
SAC comprises two sub-blocks, one is model identification using MMAE and the second
is the controller selection from a bank of controllers. MMAE is comprise a bank of deter-
ministic Kalman filters and forms the most computationally intensive part of EMMSAC.
Therefore, this chapter is to investigate the hardware architecture for MMAE based LTI
model identification. The FPGA implementation is illustrated by a simple autonomous
vehicle application. This example is not chosen to be potentially realistic we operate on
far faster timescales for switching than the realistic but, the purpose of this chapter and
the example developed, illustrate the methodology and implementation mainly to a fully
realistic applied example in power electronics application later chapter. This application
serves as a simple illustration of an example as a precursor to our main power electronics
application considered in the later chapter of this thesis.
To maximize the efficiency of the implementation and there to permit the maximum
number of filters, the complexity of the implementation is carefully addressed. The
proposed architecture is developed with reused multiplier units, shifting operations and
fixed point operations to compute Kalman gain and the Xpupdate and Σp
update equations
for each model in the filter banks of the MMAE algorithm. The proposed architecture
is implemented using FPGA for 16, 32, 64 filter banks with an autonomous vehicle
application.
39
40Chapter 3 Hardware Architecture for Linear Time Invariant System Model
Identification
It is shown that theoretically up to 78% reduction in multiplications is possible by using
the reusable multiplier architecture and fixed computations, which translates to the
reduction of 39% LUTs, 13% FFs, 27% DSPs, and 43% power reduction when compared
with the directly mapped architecture (without reusable multipliers and multiplications)
at the 100MHz operating frequency. Furthermore, the proposed architecture is able to
identify an accurate model of auto-mobile application within 510ns, in the presence of
external disturbances and abrupt changes.
The reminder of this chapter as organised in the following manner. Section 3.1 provides
the details of the multiplication reduction in each equation of MMAE algorithm pre-
sented in Chapter 2 and also discuss the proposed architecture and Section 3.2 validates
the architecture using data generated from a Matlab simulator and discusses the exper-
imental results, compares performance, in terms of time, resource utilization and power
consumption of the proposed architecture with directly mapped architecture. Finally,
Section 3.3 provides the summary of the chapter. Material from this chapter has also
been published in IEEE TCAS-II as Charan et. al [107].
3.1 Proposed Architecture
The block diagram of the proposed architecture is shown in Figure 3.1, physical system
(Pp∗) represented as discrete-time linear time-invariant system in the form
xp(k + 1) = Apx(k) +Bpu1(k) (3.1)
yp1(k) = Hpxp(k), k ∈ N (3.2)
Where ( Ap, Bp, Hp ) ∈ Rnxn x Rnxm x Roxn are state-space matrices, state x is ∈Rnxm, u2 is input and y2 is measured output signal, (u2, y2)T are the measured signals,
(u0, y0)T are the external disturbances and (u1, y1)T are the original signals at the input
and output side of a physical system (Pp∗) respectively. Cyber-component comprises
the hardware architecture of the MMAE based model identification algorithm. The
Cyber-component processes the input signals (u2, y2)T from the physical component and
processes these signals for identifying the model of the physical system. As we discussed
applications of the MMAE in Section 2.6, MMAE is used for inertial navigation during
Mars entry to accurately estimate position and velocity states [25, 108], therefore in
this chapter auto-mobile vehicle position and velocity estimation applications is used for
validating proposed architecture. The physical system auto-mobile vehicle state space
Chapter 3 Hardware Architecture for Linear Time Invariant System ModelIdentification 41
Physical Component
Cyber Component
Residuals-N
Residuals-2
Innovation
Innovation
Innovation
PhysicalPlant (Pp*)
𝑢0 𝑦0
++− −
Model-1 (DKF-1) Residuals-1
𝑢2 𝑢1 𝑦1 𝑦2
ComparatorAnd Model Selection
Output
Model-2 (DKF-2)
Model-N (DKF-N)
Filter Bank
Figure 3.1: Proposed architecture for MMAE based LTI model identification.Each model represents the deterministic Kalman filter with a particular statespace matrices. Here (u2, y2)T are the measured signals, (u0, y0)T are the exter-nal disturbances and (u1, y1)T are the original signals at the input and outputsignals of a physical system (Pp∗) respectively. The cyber component designalso corresponds to the MMAE part in Figure 1.2 shown in chapter 1
respectively where P = position, V = velocity, k = time, T = time constant uk=
Input acceleration, De= External disturbances. x(k) = [Pk, Vk]T , Hp = [1, 0] uk = u2,
u1 = u0 − u2 u0 = η2, y0 = η1, y2 = y0 − y1.
Ap =
[1 T + T 2
2 .De
0 1 + T.De
]
Bp =
[T 2
2
T
]
The vector x contains all of the information about the present state of the system, but
we cannot measure x directly. Instead, we measure y2, which is a function of x that is
corrupted by the noise. The output information y2 used to obtain an estimate of x, but
we cannot necessarily take the information from y2 at face value because it is corrupted
by noise. We can use the information that it presents to a certain extent, but we cannot
afford to grant it our total trust. In general, systems are perturbed by uncertainties due
to gusts of wind, potholes, and other unfortunate realities, which is represented as De
as shown in Figure 3.2.
42Chapter 3 Hardware Architecture for Linear Time Invariant System Model
Identification
x=[pk, vk]T
+De
-De
Down hill
Up hill
Figure 3.2: Auto-mobile vehicle with uncertainties De
3.1.1 Cyber-Component
Model identification is performed on Pp∗ for robust estimation of Pp. In this regard, each
model runs recursively on computationally intensive Deterministic Kalman Filter (DKF)
in the presence of external disturbances (as discussed in Chapter 2 from equation 2.26 to
2.31). Thus the complete model identification comprises of N -DKF modules where each
DKF processes (u2, y2)T at every time instance to provide an estimated outcome. Then
the difference between the estimated and the measured output is computed (known as
Innovation equation 2.26) at every time instance for each model-physical system. Next
step is the computation of the weighted sum of m-a number of such innovations per
each model is known as Residuals (equation 2.33). The minimum Residual among
such N model represents the best match of the physical system Pp (known as Model
Selection). For ease of understanding, the aforementioned algorithm is shown in the form
of pseudo-code in Algorithm− 1. The inputs of DKF module are Ap(i), Bp(i), Hp(i)
with initial conditions Xpestimate(0) (state variables), Σp
estimate(0) (covariance) and y2(i),
u2(i). The DKF module computes innovation, Kalman gain, update and estimation
of the state variable (x), covariance Σp recursively (same as equations 2.26-2.31). As
shown in Algorithm−1 from line 1-22, all these computations involve in 32-bit matrices
multiplications, inversion, additions and subtractions.
3.1.2 Multiplications reduction in Algorithm− 1
A reduction of multiplications in the above steps is achieved as follows:
1. The first equation involves multiplication matrices Hp and Xpestimate, since Hp is
constant, it can be performed by shifting operations. For example, considering
Chapter 3 Hardware Architecture for Linear Time Invariant System ModelIdentification 43
Algorithm 1 model adaptive estimation MMAE based model identification
1: Kalman Filter:
2: INPUT: State Space Matrices of LTI System Ap(i), Bp(i), Hp(i), Xpestimate(0),
Σpestimate(0), u2(i), y2(i)
3: for i = 1, i < final time, i = i+ 1 do
4: do in parallel
5: for p =1 to N do
6: Sub-module 1
7: Ip(i) = y2(i)−Hp(i).Xpestimate(i)
8: abs(Ip(i))
9: Sub-module 2
10: Sp(i) = Hp(i).Σp(i).Hp(i)T
11: S−1(i) = scale/Sp(i)
12: Call Residuals
13: Kalman Gain:
14: Sub-module 3
15: Kp(i) = Σp(i).Hp(i)T .S−1(i)
16: Sub-module 4
17: Xpupdate(i) = Xp
estimate(i) +Kp(i).Ip(i)/scale
18: Sub-module 5
19: Σpupdate(i) = Σp(i)−Kp(i).Hp(i).Σp(i)/scale
20: Sub-module 6
21: Xpestimate(i) = Ap(i).Xp
update(i) +Bp(i).u2
22: Sub-module 7
23: Σ(P )estimate(i) = Ap(i).Σpupdate(i).A
pT (i) +Bp(i).BpT (i)
24: end for
25: Residuals:
26: Rpl (i) =
∑Tt=T−l abs(I
p(i))[HpΣp(i)HpT +1]−1 , T ≥ l27: end parallel
28: Model Selection:
29: for j =1 to N do
30: qf (k) = argmin16p6N
Rpl [k],∀k ∈ N
31: end for
32: end for
33: OUTPUT: Identified Model
h1x1 where h1 = 13, multiplication can be removed by expressing the equation as
h1x1 = 13x1 = (8x1) + (4x1) + (1x1). (3.5)
= 23x1 + 22x1 + 20x1 (3.6)
= ls(x1, 3) + ls(x1, 2) + x1 (3.7)
where ls(a, b) signifies a left-shifted by b bits. In this example, the multiplier is
44Chapter 3 Hardware Architecture for Linear Time Invariant System Model
Identification
replaced by just three adders and two shifters. These shifters can be implemented
by simple hardware wiring. Thereby in this architecture n multiplications in each
DKF.
2. In the second sub-module, Sp are computed. This consists of the multiplication of
three matrices Hp.Σp.HpT . This is also computed by reusing the same structure
discussed in the first submodule and explained further using equation 3.7.
3. Similarly in the second equation Sp = Hp.Σp.HpT also eliminated the n2 multipli-
cations. The Kalman gain is computed by Σp, Hp and S−1, these variables change
in every iteration of DKF, therefore, it requires n multipliers.
4. The Xpupdate involves the multiplication of Kalman gain and Innovation, to com-
pute this the architecture requires n2 number of multipliers, here by reusing the
multipliers, n number of multipliers are eliminated.
5. The next equation Σpupdate involves the multiplication of the Kalman gain, Hp and
Σpupdate, except Hp remaining variables changes on the fly, we need n2 multipliers.
However, by reusing multipliers units, th number of multipliers reduced to n2−n.
6. The next equation Xpestimate depends on multiplication Ap, Σp and Bp, u2, since
Ap and Bp are constant we performed by shifting operation on there by this ar-
chitecture eliminated the n2 + n multipliers. The Σpestimate mainly depend on
computation of ApΣpApT since Ap is constant, this computation is performed by
using shifting operations and reduced n2 + n multipliers.
7. The term BpBpT conferred in the Σpestimate is pre-computed and reused in ev-
ery iteration of DKF, thereby proposed architecture able to reduce n2 number of
multipliers.
8. The term S−1 computation requires a division that increases the hardware com-
plexity. For instance, in a Xilinx FPGA, fixed-point addition takes one cycle,
whereas a single precision floating-point adder would require 14 cycles while using
one order of magnitude more resources for the same number of bits [109]. There-
fore, here we have used the LUT based method. However, to retain the precision
of this LUT based division, up-scaled the numerator first and then use the de-
nominator as the address to fetch the appropriate data from the LUT. The scaling
factor was decided based on the empirical simulations running for various scaling
factors and the error rates are shown in Figure 3.3. For the scaling factor 210, 211,
212, 213, and 214 the error rates 7.78, 6.12, 6.36, 5.59, and 5.58 for mode identifi-
cation respectively observed. As the scaling factor increases, the size of LUT also
increases.
Overall the total number of multiplications involved in MMAE algorithm is equal to the
(1 + 4n + 3n2 + 2n3)N where N , n represents the total number of models and states
Chapter 3 Hardware Architecture for Linear Time Invariant System ModelIdentification 45
0
1
2
3
4
5
6
7
8
1 2 3 4 5210 211 212 213 214
erro
r %
Scaling factor
Figure 3.3: Error rate comparison for various scaling factors
respectively and by using shifting operation and pre-computation we reduced them down
to (2n+n2)N multiplications. MMAE hardware architecture have many design choices
that can be made, typically to trade off time (throughput, latency) against area by using
the number of multipliers ranging from minimum n to maximum (2n + n2). However,
due to the data dependency between the equations mentioned in Table 3.1, choosing
the maximum (2n + n2)N number of multipliers in architecture is not an ideal choice.
Therefore this architecture is proposed to compute maximum state-space elements in
Σpupdate (n2) in single clock cycle, for n = 2, Σp
update has four state-space elements. By
0
5000
10000
15000
20000
25000
30000
35000
40000
1 129 257 385 513 641 769 897
Nu
mb
er
of
mu
ltip
licat
ion
s
Number of models
No. of multiplications in MMAE
Reduced No. of multiplications in the proposed hardware architecture
No. of multipliers used in the proposed hardware architecture
Figure 3.4: Multiplications reduction using the proposed hardware architecture:comparison for 1 to 64 models (Note: Number of multipliers used in the proposedarchitecture are even less than the number of multiplications required)
using reusable multipliers the proposed architecture reduced the number of multipliers
required to use on hardware architecture from (2n + n2)N to n2N as shown in Figure
3.4. In this hardware architecture for N = 64 number of models with n = 2, we have
used only 256 multipliers whereas directly mapped architecture used 512 multipliers.
46Chapter 3 Hardware Architecture for Linear Time Invariant System Model
Identification
The detailed comparison of the number of multiplications involved in MMAE algorithm
and proposed hardware architecture is given in Table 3.1. Most of the multiplications
conferred in DKF. This is evident that N -DKF modules contains a significant number
of multiplications and this chapter proposed an architecture to eliminate most of these.
Table 3.1: Comparison between the MMAE algorithm (Shown in algorithm-1) and proposed hardware modules in terms of the number of multiplications.Where sub-module 1-7 are associated with DKF, N= Number of models, n=number of states to be estimated, No. of mul=Number of multiplications,H.W.A= Hardware architecture
Sub-Module No. of mul No. of mul inin MMAE algorithm proposed H.W.A
(1) Innovation (Ip) Nn 0
(2) Sp Nn2 0
(3) Kalman Gain (Kp) Nn2 Nn
(4) Xpupdate Nn Nn
(5) Σpupdate Nn3 Nn2
(6) Xpestimate N(n2 + n) 0
(7) Σpestimate N(2n3 + n2) 0
(8) Residuals (Rp) N 0
Total (1 + 3n+ 4n2 + 3n3)N (2n+ n2)N
The hardware mapping of the MMAE algorithm is shown in Figure 3.5a. It comprises of
two modules one containing DKF (line no: 1-24 in algorithm 1) with Innovation com-
putation (line no: 7 in algorithm 1) and the other one involving Residual computation
(line no: 26 in algorithm 1) along with model selection (line no: 30 in algorithm 1) as
shown in Figure 3.5b. These modules are pipelined to achieve higher throughput. The
controller block is designed to monitor the data flow between the intra sub-modules of
module-1 and module-2.
Figure 3.5: (a) Proposed multiple model estimation based model identificationarchitecture: deterministic Kalman filter architecture, (b) residuals, argmin,comparator and model selection
Chapter 3 Hardware Architecture for Linear Time Invariant System ModelIdentification 47
3.1.3 Deterministic Kalman Filter (DKF)
To explain DKF equations in algorithm 1 for computing one of the variables of both
Xpestimate and Σp
estimate matrices, the equations to hardware mapping is shown in Figure
3.6. During the first iteration it takes Xpestimate(0), Σp
estimate(0) and y2(1) as input and
from the second iteration onwards it takes measured signal y2, the first iteration outputs
Xpestimate and Σp
estimate feedback to input. The detailed operation explained as follows.
1. The innovation equation (line−7 in algorithm−1 and equation 2.26 in chapter−2), it is computed by using shifting operation and subtracter, the output innovation
indicated as 5 in Figure 3.6. In parallel the term Sp is calculated by using the
shifting operations and its inverse is computed by using LUT.
2. By using a reusable multiplier, Kalman gain (2.27) is computed by sending S−1
and ΣpHpT as an input to the multiplier. It is also indicated as 13 in Figure 3.6.
The architecture for the reusable multiplier is shown in Figure 3.7.
Where a, b, c, d, e are the inputs of multiplexer (MUX) and c1, c2, c3, c4 are the
control bits to the MUX.
3. After computing Kalman gain, by using same multiplier, the term Kp ∗ Ip is
computed output of this indicated as 15a in Figure 3.6, outcome of this down-
scaled and added with Xpestimate to obtain the Xp
update (line− 17 in Algorithm−1 and equation 2.28 in chapter − 2), it also indicated as 15 in Figure 3.6.
4. In parallelKp and Σpestimate are multiplied and downscaled, subtracted from Σp
estimate
to obtain the Σpupdate (line−19 in algorithm−1 and equation 2.29 in chapter−2),
it also indicated as 17 in Figure 3.6.
5. The step ApXpupdate is computed by using shifting operations, in parallel u2B also
computed by using shifting operations and these terms are added to obtain the
Xpestimate (line − 21 in Algorithm − 1 and equation 2.30 in chapter − 2), it also
stored in the register to send as a feedback for next iteration. it is also indicated
as 19 in Figure 3.6.
6. In parallel Ap.Σpupdate.A
pT is computed by using shifting operation and added pre-
computed BpBpT to it, to obtain the Σpestimate (equation 2.31 in chapter-2 and line
number 23 in algorithm−1). These results are stored in registers for providing in-
put to DKF in the next iteration. In the similar fashion n2-Σpestimate and n-Xp
update
values are computed in single DKF for every iteration. Similarly, 64-DKF modules
were designed for each state-space matrices set Ap, Bp, Hp where 1 ≤ p ≤ 64.
The 64 absolute values of innovations are stored in a buffer and send to module-2
for selecting the appropriate model.
48Chapter 3 Hardware Architecture for Linear Time Invariant System Model
Identification
shift
𝑦2
mul1
Reg
abs
Regm
ul1
Kpg
HpT
Reg
mul1
Shift
Hp
>>
Xpupdate
+>>
∑pU
pdate
ApA
pT
+
Ap∑
p ApT
A
+
Bp
shift
u2
Xpestim
ate
shift
Reg
Reg
BBT
∑pestim
ate
Input to module 2
I p
∑pestim
ate
∑pestim
ate
Xpestim
ate
DIV
∑pestim
ate
Feedback to input
Feedback to input
Xpestim
ate
shift
HpT
shiftH
pHpT
shift
∑pestim
ate
519
21
17
13
6
9
15
8
Reg 15a
Figu
re3.6:
Determ
inistic
Kalm
an
filter
detailed
architectu
refor
comp
utin
gXpestim
ate
and
Σpestim
ate
recursively,
inp
aralleln
similar
arch
itectures
forN
mod
elsare
used
com
pu
teth
ep
arameters.
Th
enum
bers
correspon
dto
the
line
nu
mb
ersinAlgorith
m−
1
Chapter 3 Hardware Architecture for Linear Time Invariant System ModelIdentification 49
REG
*
a
bc
c3
c2c1
d1
m2
m3
m1
d
out
e
c4
Figure 3.7: Reusable multiplier architecture
Table 3.2: Reusable multiplier operation. Kp=Kalman gain,AI=abs(Innovation) and SM=Sub module OTM=Output to the sub-module
Inputs to multiplier Control BitsOTM
a b c d e c1 c2 c3 c4
S−1 - - ΣpHpT - 0 0 0 1 SM3
- - AI - Kp - 1 1 0 SM4
- HpΣp - - Kp 1 0 1 0 SM5
7. The architecture shown in Figure 3.5b was used for computing the residuals and
model selection (line no: 26 in algorithm-1). This module takes input (Innovation)
from the DKF module and computes the final model which is close to the physical
system. The operation of the residual sub-module is explained as follows.
8. Initially, innovations from N -DKF modules are forwarded to the N -residual sub-
modules (Figure 3.5b). Each residual sub-module stores these innovations in their
respective shift registers. At each clock cycle, these innovations are shifted their
location by one place. Once the shift registers filled by m innovations, it starts
the computation of residual. In this interval, the model selection block sends the
default identified model as 1 and after filling all the shift registers, each value in
the shift register multiplied with weights (w1, w2, w3) as shown in Figure 3.5b and
then added together for getting final residual. To reduce hardware complexity,
the weights w1, w2, w3 are chosen as multiples of two such that the residuals can
be computed just by left shifting the innovations and only considered a summa-
tion of innovations. This module comprises the shift register, adders and shifting
operations.
9. Subsequently, N -residuals are forwarded to argmin (Figure 3.5b) module for com-
puting the minimum location among all. This argmin sub-module is a pipelined
architecture with log2Nmax stages of comparators organized in tree structures.
50Chapter 3 Hardware Architecture for Linear Time Invariant System Model
Identification
3.2 Results and Discussion
3.2.1 Physical system data generation
Proposed architecture is considered 64 uncertainty levels such that Dexternal, ∈[−
31.3, 68.5], Noise ∈
[− 5.64, 6.05
]for validation and corresponding state space models
with matrices set Ap, Bp, Hp were generated where 1 ≤ p ≤ 64. Based on these models,
64 bank of DKFs are designed on the hardware by using the architecture discussed in
the above section. To obtain the original physical system data (y2 in Algorithm − 1),
we emulated using equation 3.2, by changing the uncertainty level randomly in equation
3.4 by adding external disturbances and noise changes every sample drawn from[−
5.64, 6.05]
for both η1 and η2 in the system.
3.2.2 Matlab implementation
To compare the performance of the proposed architecture with sequential execution
hardware platforms, algorithm 1 is also implemented in Matlab with a 64-bit floating-
point for performance comparison. It has taken 20sec time on an Intel Core i7-6700-
CPU @3.4GHz to run 64 models sequentially. Hence by the time of one DKF iteration
(0.3125sec) in MATLAB simulation, we can compute 4.46x106 DKF iterations on FPGA.
3.2.3 FPGA implementation
The proposed architecture has been coded in Verilog, synthesized using Xilinx′s Vivado
2017.4 and prototyped on Virtex ultra-scale plus FPGA (VCU118 evaluation platform
with xcvu9p Device). The block diagram of the experimental setup is shown in Figure
3.8 and FPGA was connected to the PC through the Xilinx platform JTAG Cable. The
design was programmed into the FPGA through the Vivado hardware manager. The
global system reset was given by an onboard push button (SW12[0]). Onboard clock
generator U122 Silicon Labs SI5335A-B03426-GM (CLK0A 300 MHz) is used in this
architecture. For the validation purpose of this prototype, we considered position and
velocity estimation models for autonomous auto-mobile is one of the major applications
in CPS. It is to be noted that the cyber component architecture shown in Figure 3.1
is implemented on FPGA. Matlab emulated data were stored in the BRAM of FPGA
and fed to the architecture at every clock cycle at a sampling rate of 70ns which acts
as a physical system. Xilinx Block memory generator IP was used to crate BRAM on
FPGA. The proposed architecture is designed using 32-bit word length and it was found
to be able to identify the physical system model by processing the system’s input and
output in the presence of external disturbances. Vivado integrated logic analyser (ILA)
was used for verifying the obtained results from the proposed architecture.
Chapter 3 Hardware Architecture for Linear Time Invariant System ModelIdentification 51
Figure 3.8: Experimental setup for the LTI model identification architecturevalidation
Table 3.3: Module wise breakdown of the FPGA resource utilization of theproposed LTI model identification architecture
Module LUT FF DSP
DKF 847 887 16
Residuals 152 0 0
Comparator 36 40 0
Division 40 0 0
Model Selection 10 10 0
Table 3.4: Resource utilization comparison in-terms of LUT between the pro-posed architectures with respect to the model size. Directly mapped = Directlymapping of the MMAE algorithm without a reduction in multiplications,
Proposed = proposed architecture, % percentage with respect to the total availableresources on VCU118-FPGA
Model Size (N)LUT
Directly mapped Proposed
16 26019 (2.2%) 15760 (1.3%)
32 50942 (4.3%) 28593 (2.4%)
64 100813 (8.5%) 60989 (5.15%)
52Chapter 3 Hardware Architecture for Linear Time Invariant System Model
Chapter 3 Hardware Architecture for Linear Time Invariant System ModelIdentification 53
Table 3.5: Resource utilization comparison in-terms of FF between the pro-posed architectures with respect to the model size. Directly mapped = Directlymapping of the MMAE algorithm without a reduction in multiplications, Pro-posed = proposed architecture, % percentage with respect to the total availableresources on VCU118-FPGA
Model Size (N)FF
Directly mapped Proposed
16 22292 (0.94%) 16544 (0.69%)
32 39244 (1.6%) 30601 (1.2%)
64 69980 (2.9%) 60860 (2.5%)
Table 3.6: Resource utilization comparison in-terms of DSP and power, betweenthe proposed architectures with respect to the model size. Directly mapped =Directly mapping of the MMAE algorithm without a reduction in multiplica-tions, Proposed = proposed architecture, % percentage with respect to the totalavailable resources on VCU118-FPGA
Model Size (N)DSP
Directly mapped Proposed
16 352 (5.4%) 256 (3.9%)
32 704 (10.8%) 512 (7.9%)
64 1408 (21.7%) 1024 (15.8%)
Table 3.7: Resource utilization comparison in-terms of power between the pro-posed architectures with respect to the model size. Directly mapped = Directlymapping of MMAE algorithm without a reduction in multiplications, Proposed= proposed architecture, % percentage with respect to the total available re-sources on VCU118-FPGA
Model Size (N)Power in mW
Directly mapped Proposed
16 582 329
32 1104 613
64 2145 1203
3.2.4 Performance
3.2.4.1 Original physical system vs proposed architecture
In order to assess the performance of proposed architecture in-terms of model identifi-
cation, we consider the two case studies here, when emulated physical system changes
at 3µs , 6µs and corresponding results were shown in Figure 3.9. It is observed that
the aim of these graphs is to show that, how quickly the proposed design is able to
identify the physical system after it changes from one uncertainty level to another un-
certainty. To illustrate, considering at 12µs time instant in Figure 3.9 (a), the original
physical system changes its model from 59 to 9 (shown in dotted blue) which is accu-
rately identified by the proposed architecture (shown in brown) at 12.6µs. Similarly, the
54Chapter 3 Hardware Architecture for Linear Time Invariant System Model
Identification
original physical system, as shown in Figure 3.9 (b), changes the model from 59 to 58 at
30µs time instant and it was also accurately identified by the architecture at 30.36µs.
The delay between the original physical system and FPGA values is the time required
for the proposed architecture to identify the model after the original physical system
changed from one model to another model and is defined as Nas.Nclk/fclk. Where Nclk
is the number of clock cycles required for each DKF iteration and fclk is operating fre-
quency. The proposed FPGA architecture main contribution is for the terms Nclk = 7
and fclk = 100MHz. The term Nas is the number of average samples required for the
algorithm to identify the correct model after the physical system changes its model, it
also depend on the size of the residuals window, for the above cases it is ≈7.29 samples.
It is to be noted that all DKF models are running in parallel on FPGA at 100MHz fre-
quency, this is the main advantage of implementing MMAE on FPGA over the existing
DSP implementations [27, 26]. The proposed FPGA architecture is able to identify the
models in ≈510ns between 1 ≤ N ≤ 64 corresponding to the changing physical system
and overall model identification accuracy is the average difference between the physical
system model and identified model is ≈ 92% for above cases, next section discusses the
hardware resource utilization.
3.2.5 Hardware Resource Utilization
The proposed architecture conferred 16 DSP units for multiplication operation in each
DKF, whereas the directly mapped architecture conferred 22 DSP units for the multi-
plication operation. Due to the reusing of multipliers this DSP reduction is achieved
in the proposed architecture. Theoretically, it achieved 78% reduction in multiplication
however, the synthesis tool trimmed constant multiplications and thereby proposed ar-
chitecture achieves only 27% improvement in the number of multipliers, 39% for LUTs
and 13% for FFs.
To show the performance improvement of the proposed architecture, since there is no
reported architecture present, the MMAE algorithm also implemented using directly
mapped architecture it is a direct mapping of the MMAE algorithm to the hardware
without reusing the multipliers. It is also designed for the first time, which results in
100813 LUT’s, 69980 FF’s and 1408 DSP’s resource utilization for 64 models.
3.2.5.1 FPGA
The breakdown of FPGA resource utilization of the proposed architecture is presented
in Table 3.4. Among all modules, 78% of LUT’s, 94% of FF’s and 100% of DSP’s
are utilized by DKF. This is evident to say that DKF is computationally intensive.
In order to assess the variation of resource consumption with respect to model size and
resource utilization shown in Table 3.4, 3.5, 3.6 and 3.7. It can be observed that resource
Chapter 3 Hardware Architecture for Linear Time Invariant System ModelIdentification 55
utilization linearly increases with respect to model size for a fixed word length. However,
for fetching the original physical system data from BRAM to the FPGA and to capture
the output data from architecture, Vivado ILA is incorporated and total consumption
is 62328 (5.27%) of lookup table (LUT), 63070 (2.67%) of Flip-Flops, 1024 (14.97%) of
DSP’s and 28 (1.3%) Block RAM Tile on Virtex ultra-scale plus FPGA (VCU118) at
100MHz operating frequency for 64 number of models.
It can be noticed that the proposed architecture improved by 39%, 13% and 27% of
LUT’s, FF’s, DSP’s resource utilization respectively when compared with the directly
mapped architecture, detailed utilization with respect to the various bank of filter models
is given in Table 3.4, 3.5, 3.6 and 3.7. The utilization percentage is with respect to the
total available resources on VCU118 also give in the same table.
3.2.5.2 Power
0.039
0.083
0.062
0.016
0.124
0.006
0.053
0.189
0.172
0.02
0.144
0.006
Clocks
Signals
Logic
BRAM
DSP
I/O
(a) (b)
Figure 3.10: FPGA power consumption results for 16 models between the di-rectly mapped and proposed architecture
0.065
0.161
0.114
0.017
0.251
0.006
0.087
0.363
0.341
0.02
0.287
0.006
Clocks
Signals
Logic
BRAM
DSP
I/O
(a) (b)
Figure 3.11: FPGA power consumption results for 32 models between the di-rectly mapped and proposed architecture
The detailed breakdown of FPGA power consumption using the Xilinx power analyser
between the directly mapped and proposed architectures are shown in Figure 3.10, 3.11
56Chapter 3 Hardware Architecture for Linear Time Invariant System Model
Identification
0.151
0.71
0.683
0.02
0.575
0.006
Clocks
Signals
Logic
BRAM
DSP
I/O
0.114
0.32
0.244
0.017
0.503
0.006
(a) (b)
Figure 3.12: FPGA power consumption results for 64 models between the di-rectly mapped architecture and proposed architecture
and 3.12. The proposed architecture showed that 64%, 54%, 24%, 12% power con-
sumption reduction in logic, signals, clocks, and DSP respectively. The overall power
consumption of the proposed architecture reduced by 43% when compared with the di-
rectly mapped architecture for 64-bank of filters. Similarly, detailed power consumption
for 16 shown in Figure 3.10 and 32 number of models is shown in Figure 3.11. Whilst
power reduction is not important per scaling this application, it is important in other
“edge” computing application which do operate on battery-based backup.
3.3 Resource utilization analysis
To estimate resource utilization for the higher number of models in the MMAE, a linear
regression analysis method is used. An example derivation of the LUT resource uti-
lization regression equation for directly mapped architecture based on data presented in
Table 3.4 is given below. To show the regression analysis accuracy, outcome of regression
equations and original data comparison plots for number of models 16 to 64 are shown
Figure 3.16, 3.17 and 3.18 for LUTs, FFs and power respectively.
SumN = 16 + 32 + 64 = 112 (3.8)
SumLUT = 17774 (3.9)
MeanN = 37.33 (3.10)
MeanLUT = 59258 (3.11)
Sum of squares(SSN ) = 1194.6 (3.12)
Sum of products(SP ) = 1861584 (3.13)
(3.14)
Chapter 3 Hardware Architecture for Linear Time Invariant System ModelIdentification 57
of boost converter, Section 4.5 provides the details of the experimental methodology
and discusses the results and performance in terms of area, speed and power. Finally,
Section 4.6 provides details about filter bank resources utilization for the higher number
of models and finally, Section 4.7 ends the chapter with a discussion.
4.1 Introduction
There is continuing interest in developing online LTV system multiple model identifi-
cation (MI) implementations for applications such as intelligent control systems [39],
[112, 113], target tracking and detection [78], system fault detection and isolation [32,
34, 114, 79, 40]. This chapter considers a real-time model identification procedure for
a demanding application in power electronics, targeted as a component of a closed-loop
EMMSAC controller [21, 24]. This application requires rapid computation due to the
fast dynamics and hence required a fast sampling rate. The model identification pro-
cedure comprises a parallel bank of Kalman filters, each tuned to a different candidate
model. The computed residuals assess the fit of the candidate models to the real-time
observed data, thus yielding the online model identification procedure by the real-time
selection of the model of best current fit. The physical system modelled is a DC-DC
boost converter with an uncertain load [115]. To achieve the highest performance of the
converter, it is necessary to tune the controller accurately, thus motivating the need for
high-speed real-time model identification to determine the (unknown) load and other
electrical parameters to permit this tuning to be done automatically, example MMAC
scheme [21, 24]. Furthermore, the boost converter is a switched linear system and has
an LTV characteristic, hence introducing further complexity to the implementation of
the filter bank. At present, there are no reported hardware architectures for tackling the
relevant LTV system identification. This chapter provides the first-ever hardware ar-
chitecture for LTV model identification based on the recently developed multiple model
adaptive estimation (MMAE) algorithm [21]. The results build on previous work by the
authors on an LTI system identification architecture [107].
4.2 LTV model identification algorithm
The MMAE based model identification algorithm endeavour to find the best match of a
mathematical model of the physical system with the following discrete state-space model
Chapter 4 Linear Time Variant System Model Identification Architecture 63
Multiple model Adaptive Estimation (MMAE)
outputInput
Physical system
Identified model
𝑦0
+𝑦1 𝑦2
𝑢0+
−𝑢2 𝑢1
Figure 4.1: Proposed model identification block diagram
representation.
xp(t+ 1) = Apjx(t) +Bpj u1
yp1(t) = Hpj x(t)
y0 = y1 + y2
u0 = u1 + u2
u2 = Hpj y2
(4.1)
where (Apj , Bpj , H
pj ) ∈ Rnxn x Rnx1 x R1xn are the time-varying state-space matrices,
p ∈ 1, 2, ....N, j ∈ 1, 2, 3, state x is ∈ Rnx1, and (u2, y2)T are the measured signals,
(u0, y0)T are the external disturbances and (u1, y1)T are the original signals at the input
and output side of a physical system respectively as shown in Figure 4.1. The internal
structure of MMAE unit is shown in Figure 4.2, it consists of N -number of deterministic
Kalman filters (m1, m2, ... mN ) in the stage-1. Each filter runs with distinguished time-
varying system state-space matrices, these filters estimate state variables by utilizing
measured information (y2). The difference between measured and estimated signals
called as innovation (I1, I2, ...IN ). The summation of this innovation over the period
is called as residuals (R1, R2.... RN ), it is computed in the stage-2 and finally, in the
stage-3 minimum residuals represents the best-matched model of physical system, its
model number (N) sent to output stage. The pseudo-code given in Algorithm − 2,
where Apj , Bpj are state space matrices of physical system which changes with time, Ip
is innovation, Kp is Kalman gain, Σp is co-variance and l is residuals window size.
At the stage-1 (shown in Figure 4.2) computation fo DKF most expensive, its equations
are given in algorithm-2 (same as equations 2.26-2.31). The inputs of DKF module
are Apj , Bpj , H
pj with initial conditions Xp
estimate(1) (state variables), Σpestimate(1) (co-
variance) and y2, u2. The DKF module computes innovation (4.2), Kalman gain (4.3),
update and estimation of the state variable Xpupdate (4.4), Xp
estimate (4.5) co-variance
Σpupdate (4.6) and Σp
estimate (4.7).
64 Chapter 4 Linear Time Variant System Model Identification Architecture
m1(DKF) R1
R2
RN
minm2(DKF)
mN(DKF)
I1
I2
In
Stage-1 Stage-2 Stage-3
Figure 4.2: Block diagram of the proposed 3 stage architecture for MMAEbased LTV system model identification. Stage-1 is DKF computation, stage-2is residuals computation and stage-3 is minimum residuals identification. Thisarchitecture also corresponds to the MMAE part in Figure 1.2 shown in chapter1
Ip = y2 −Hpxpestimate (4.2)
Kp = ΣpHpTS−1 (4.3)
Xpupdate = Xp
estimate +KpIp/scale (4.4)
Σpupdate = Σp
estimate −KpHpΣp
estimate/scale (4.5)
Xpestimate = ApkjX
pupdate +Bp
kju2 (4.6)
Σpestimate = ApkjΣ
pupdate(A
pkj)
T +Bpkj(B
pkj)
T (4.7)
recursively. The computation of the aforementioned equations involves matrices multi-
plications, inversion, additions and subtractions. Moreover, for the LTV system, state-
space matrices change with respect to time. Due to this, the number of online mul-
tiplications in the computation of DKF is increasing when compared to LTI model
identification architecture.
4.3 Proposed architecture
The number of multiplications involved in the computation of algorithm-2 are given in
Table 4.1, most of the computational complexity is associated with the DKF module
in the computation of the estimation, Kalman gain and update equation of x and Σp
(equation 25−28 in algorithm 2). The total number of multiplications involved in these
equations is (3n+ 2n2 + 2n3)N where n is the number of states and N is the number of
models. The latency of DKF architecture directly depends on the number of available
multipliers in each cycle, to achieve maximum throughput it requires n3 +n multipliers,
however, due to resource limitation, this work investigated resource trade-off by using
Chapter 4 Linear Time Variant System Model Identification Architecture 65
Algorithm 2 Algorithm for linear time-variant CPS model identification
1: Input Apj , B
pj , H
pj where j ∈ 1, 2, 3 and p ∈ 1, 2, ....N l = window size
2: for i = 1, i < final time, i = i+ 1 do
3: if if(mod(i,Nsamples) == 0) then
4: do in parallel
5: for p = 1, p < N, p = p+ 1 do
6: State-space matrices selection (pre-computed)
7: if case1 then
8: Apj (i) = A1
9: Bpj (i) = B1
10: end if
11: if case2 then
12: Apj (i) = A2
13: Bpj (i) = B2
14: end if
15: if case3 then
16: Apj (i) = A3
17: Bpj (i) = B3
18: end if
19: Continuous to discrete conversion (pre-computed)
20: Apkj(i) = I +Ap
j (i)Ts
21: Bpkj(i) = Bp
j (i)Ts
22: Deterministic Kalman filter
23: Sp(i) = Hp(i)Σpestimate(i)H
p(i)T
24: S−1(i) = scale/S(i)
25: Innovation (Ip(i))
26: Kalman gain (Kp(i))
27: Xpupdate(i),Σ
pupdate(i)
28: Xpestimate(i),Σ
pestimate(i)
29: Rpl (i) =
∑Tw
t=Tw−l ‖Ip(i)‖, Tw ≥ l
30: end for
31: end parallel
32: qf (i) = argminpi∈P
(‖Rpl (i)‖) for given l
33: end if
34: end for
66 Chapter 4 Linear Time Variant System Model Identification Architecture
0 50 100 150 200 250 300
Number of models
0
500
1000
1500
2000
2500
3000
Num
ber
of m
ultip
liers
ConventionalProposed mul-8Proposed mul-4
Figure 4.3: Number of multipliers comparison between the conventional andproposed eight, four multipliers version architectures for n = 2 and modelsranging form 1 to 256
n3 and n2 number of multipliers. The required number multipliers detailed comparison
is shown in Figure 4.3 with n=2 and a number model ranging from 1 to 256. It is
clear evidence that by using eight and four multipliers in DKF, a significant amount
of resources can be saved when compared with the conventional way. The proposed
hardware architecture for computing a single variable inXpupdate and Σp matrices is shown
in Figure 4.4, which mainly consists of a sequence of addition/subtraction, multiplication
and shifting operations. Dedicated registers were used to store the computed values
for reusing in subsequent operations. For n = 2, DKF latency is 10 and 15 clock
cycles respectively. Due to the resource limitation on FPGA, DKF was designed by
using reusable multipliers. For investigating hardware trade-off, each DKF was designed
using n3 and n2 reusable multipliers half of them are performs operation on bs bit-size
multiplicands, it is represented with mulv1 in Figure 4.4 and remaining half performs
operations on multiplicands with bit size bs and 2bs − 1, it is represented as mulv2 in
Figure 4.4. The structure of the reusable multiplier is shown in Figure 4.5 and details
of the architecture are described below.
In the first stage, innovation (Ip) is computed by subtracting x from y2, immediately its
absolute value also computed and the outcome of this stored in the register to perform
next stage computations. In parallel, S−1 is computed by using the division module. In
the second stage, to compute Kalman gain, n-mulv1 type multipliers are used with multi-
plicand set (Σp, S−1). Subsequently, in the third stage, the result of the aforementioned
multipliers and innovation values are fed to two mulv2 multipliers to compute KpIp.
Chapter 4 Linear Time Variant System Model Identification Architecture 67
Table 4.1: Total number of multiplication operations in model identificationarchitecture, N= Number of models, n= number of states to be estimated, No.of mul= Number of multiplications
Equation name Required No. of mul on hardware
Kalman gain (Kp) Nn2
Xpupdate Nn
Σpupdate Nn3
Xpestimate N(n2 + n)
Σpestimate N(2n3 + n2)
Total (2n+ 3n2 + 3n3)N
The final result is downscaled by scale times and stored in the registers. In the next
stage, values of Xpestimate variables are added to the obtained results respectively to get
Xpupdate values and these values are stored in the registers to utilize in the next stages.
In the same stage, n2 mulv2 multipliers are used to to compute the KpHpΣp which
is sub equation of Σpupdate. In the next stage, using four mulv1 multipliers with input
vectors given in Table 4.2 and in parallel to compute Σpupdate, outcome of four mulv2 is
subtracted from the Σpestimate. Input vectors and control bits of mulv2 are given in Table
4.3. In the next stage outcome of these multipliers are added together and subsequently
downscaled to get final Xpestimate values. It is also stored in the registers to utilize in
the next iteration of the Kalman filter. In parallel, four mulv1 are used to compute
the first column of ΣpApT with input vectors given in Table 4.2. Similarly, in the next
stage mulv1 are used to compute the second column of ΣpApT by changing input vectors
of multipliers. In the same stage, to compute ApΣpApT , n2-mulv2 are used with input
ΣpApT and Ap, in the next stage results of these multipliers downscaled and added with
BpBpT to obtain the first column of final Σpestimate. The 10 state-based state machine
is used to coordinate the data path and control path of the proposed architecture. In
the similar fashion n2-Σpestimate and n-Xp
update values are computed in single DKF for
every iteration. Similarly, N-DKF modules were designed for each state-space matrices
set Ap, Bp, Hp where 1 ≤ p ≤ N . The N -absolute values of innovations are stored in
the buffer and send to residuals module-2 (shown in Figure 4.6) for computing residuals.
Subsequently, using the argmin module, the appropriate model is been selected.
It is to be noted that, in the 1st step the state-space matrices are chosen depending on
system parameters (line number 6-18 in algorithm 2). After selecting the matrices, we
need to convert them into discrete domain by using the equation in line 20 and 21. In
algorithm 2, steps 19-21 are precomputed and stored in registers, for the brevity of under-
standing only they are presented. Here sampling time Ts, the outcome of these equations
are floating-point values, due to this, the preceding operations need to be performed us-
ing the floating-point computations. However, floating-point computation requires more
hardware resources when compared to fixed-point operations. For instance, in a Xilinx
FPGA, fixed-point addition takes one cycle, whereas a single precision floating-point
68 Chapter 4 Linear Time Variant System Model Identification Architecture
absI p
Xpestim
ateshift
Reg
DIV
∑Pestim
ate
shiftH
pHpT
mulv1
mulv1
>>>>
mulv2
mulv2
++
Xpestim
ate
Xpestim
ate
mulv1
mulv1
+
Xpupdate
Xpupdate
>>
Xpestim
ate
Input to module 2
Ap
+
Bp
mulv1
u2
y2
HpT
Reg
Kp2
Feedback to input
∑Pestim
ate
∑Pestim
ate
ApT
Kp1
Ap
mulv1
-m
ulv2
mulv1
mulv2
mulv2
++
Ap-
mulv2
ApT
∑Pestim
ate
∑Pestim
ate
∑Pestim
ate
Reg
+
BpB
pT
∑pupdate
>>>>
Figu
re4.4:
Prop
osedd
etermin
isticK
alman
filter
detailed
architectu
refor
comp
utin
gxpestim
ate
and
Σpestim
ate ,
inp
aralleln
similar
architectu
resare
used
forN
mod
elsto
com
pute
the
param
eters.(m
od
ule
2is
show
nin
Figu
re4.6)
Chapter 4 Linear Time Variant System Model Identification Architecture 69
adder would require 14 cycles while using one order of magnitude more resources for the
same number of bits [109]. Therefore, for implementing the architecture on hardware
algorithm is modified by using a scaling factor namely scale = 215 is used in algorithm 2,
this value is empirically chosen to retain precision. The scale factor converts the discrete
state-space matrices to integer values and it also helps to avoid the floating-point value
during the S−1 computation. To reduce the hardware complexity these scaling factors
are chosen as multiples of two.
*
c1
m1
c2
m1
e
f
c5
m1
c
d
c4
m1
a
b
c3
m1
e
f
c6
m1
mulv1/v2
Figure 4.5: Reusable multiplier architecture
Table 4.2: Multiplier version-1 input data, where cx is the control bit and mulxis the multiplier number
c1 c3 c4 input mul1 mul2 mul3 mul40 0 - a Σp
01 Σp11
0 1 - b xp00 xp10 xp00 xp10
1 - 0 c Σp00 Σp
01 Σp10 Σp
11
1 - 1 d Σp00 Σp
01 Σp10 Σp
11
c2 c5 c6
0 0 - e S−1 S−1
0 1 - f Ap00 Ap01 Ap10 Ap11
1 - 0 g Ap00 Ap01 Ap00 Ap01
1 - 1 h Ap10 Ap11 Ap10 Ap11
4.3.1 Control block
Since the same computational units are being reused to perform many different opera-
tions, the necessary control is rather complex. The controller block decides to choose the
70 Chapter 4 Linear Time Variant System Model Identification Architecture
Table 4.3: Multiplier version-2 input data, where cx is the control bit and mulxis the multiplier number
c1 c3 c4 input mul1 mul2 mul3 mul40 0 - a Kp
00 Kp10
0 1 - b ΣpAp00 ΣpAp10 ΣpAp00 ΣpAp10
1 - 0 c Kp00 Kp
00 Kp10 Kp
10
1 - 1 d ΣpAp01 ΣpAp11 ΣpAp01 ΣpAp11
c2 c5 c6
0 0 - e Ip Ip
0 1 - f Ap00 Ap01 Ap10 A11
1 - 0 g Σp10 Σp
11 Σp10 Σp
11
1 - 1 h Ap00 Ap01 Ap10 Ap11
input matrices values from the memory, it also needs to provide the correct sequence
data to the multiplier units and store the results in dedicated registers. This unit is
also responsible for taking the measured data and sending innovation data to the resid-
uals module for every iteration of DKF. To perform this, the proposed architecture is
designed using a one-hot state machine. In the initial state, it starts by selecting the ap-
propriate state-space matrices and subsequently sends/receives data from the multiplier
units after updating the Xp, Σp it goes back to the first state.
4.3.2 Residuals computation unit
Residual is the summation of the absolute difference between the measured voltage and
estimated voltage over the period of time and it is defined by the following equation.
Rpl (i) =
Tw∑t=Tw−l
‖Vmeasured(i)−HpXpestimate(i)‖[HpΣpHpT+1]−1 , Tw ≥ l (4.8)
where l is the length of the residuals selected based on the empirical experiments that
will be discussed in the next section and p is the model number for the corresponding
load 1 < p < N . The performance of the controller depends on the size of the residuals.
Ideally, the residuals are computed from the initial time to the current time but, since
the residuals memory requirements make impose practical applications, the window size
is to be fixed based on the trade-off between the memory and accuracy.
The residuals computation unit is shown in Figure 4.6, which is mainly consists of an
increment counter with a maximum count of l − 1. For the initial l number of DKF
iterations, innovation values are summed up using the recursive adder, in parallel in-
novation data also stored in BRAM with the address generated by the aforementioned
counter. After l − 1 number of clock cycles, the first residual output is available. To
compute subsequent residuals, the architecture adds the input innovation data and sub-
tract innovation stored at address an where n is corresponding to nth residuals. Same
Chapter 4 Linear Time Variant System Model Identification Architecture 71
time the input innovation data has stored in BRAM with address location an. By taking
advantage of the read first mode of BRAM, before writing data into the given address
location of BRAM, the data was read from the same address location. Subsequently,
N-residuals are forwarded to the argmin module for computing the minimum location
among all. This argmin sub-module is a pipelined architecture with log2Nmax stages of
comparators organized in tree structures. Argmin block individually designed for each
bank (16, 32, 64, 128, 256) and resource utilization is reported in Table 4.4.
Table 4.4: Argmin module resource utilization
No. of models LUT FF
16 92 186
32 205 401
64 433 835
128 1522 892
256 2877 1607
512 5178 2892
4.3.3 Pipelining
The modules DKF, residuals and argmin are pipelined to achieve higher efficiency, it
is shown in Figure 4.1. Stage 1, stage 2 and stage 3 are running continuously. The
processing time of each stage is mainly governed by the latency DKF module (stage-
1). For n = 2 DKF latency is 10 and 15 clock cycles respectively. In addition, due to
the parallel architecture, the latency is independent of the number of models used in
the filter bank of MMAE and it can be scalable to any number of models (N) without
impacting the execution speed.
72 Chapter 4 Linear Time Variant System Model Identification Architecture
4.4 Boost Converter Application and Model
Given an input voltage Vin the function of a boost converter is to regulate the output
voltage Vout across the load Rload to a specified value higher than Vin. This is achieved
by an appropriate choice of the PWM signal η(t) driving the MOSFET which can be
modelled as acting as an ideal switch causing the circuit to switch between two circuits
illustrated in Figure 4.7 bottom left and bottom right. Alternately switching at an
appropriate rate between these two configurations can achieve the desired regulation.
In our setting Rload is unknown, and the function of the MMAE is to determine the
model dependent on the uncertain load Rload from real-time measurements of Vout and
knowledge of input signals corresponding to Vin and the switching PWM signal.
For a fixed RL, RC , L,RDS , we now define a model p, 1 ≤ p ≤ N for a given resistive load
Rload. Assuming ideal components, the state-space representation of a boost converter
shown in Figure 4.7, is given in the continuous time domain as follows.
For each state of the switch, (on or off), the converter circuit is LTI, with the corre-
sponding SISO continuous time state-space description
xp(t) = Apjx(t) +Bpj u(t) (4.9)
yp(t) = Hpj x(t) (4.10)
where the state x(t) is given by:
x(t) =[iL(t), VC(t)
]ᵀ, (4.11)
and where the input u(t) is the input voltage and the output y(t) is the output voltage:
u1(t) = Vin, (4.12)
y1(t) = Vout(t) (4.13)
Chapter 4 Linear Time Variant System Model Identification Architecture 73
Vin
L
CRload
RL Rc
RDS
PWM=1Vin
L
CRload
D1RL RDRc
PWM=0
Vin
L
CRload
SD1
PWM
RL RDRc
RDS
PWM=1 PWM=0
(a) (b)
Figure 4.7: The boost converter circuit diagram. When the PWM signal is 1,the MOSFET acts as a closed switch (S = 1) giving rise to the left-hand circuit.When the PWM signal is 0, the MOSFET acts as a closed switch (S = 0) givingrise to the right-hand circuit
the index j describes the state of the switch: j = on,off and the state-space equations
are given by:
Apon =
[− (RL+RDS)
L 0
0 − 1C(Rload+RC)
](4.14)
Apoff =
[−Rload‖RC
L + (RL+RDS)L − Rload
L(Rload+RC)
− RloadC(Rload+RC) − 1
C(Rload+RC)
](4.15)
Bpon =
[1L
0
](4.16)
Bpoff =
[Vin−VD
L
0
](4.17)
Hpon = Hp
off =
[0
RloadRC+Rload
](4.18)
The LTV model is complete by setting
s(t) =
on if η(t) = 1,
off if η(t) = 0,(4.19)
where η(t) is taken throughout this chapter to be a 10kHz PWM signal with the 50%
duty cycle, switching between 0 and 1.
For the remainder of the chapter, the boost circuit parameters are taken to correspond
74 Chapter 4 Linear Time Variant System Model Identification Architecture
Residual-1
PWM
Voltage
Vout
ADC
Select minimum
Residual-2
Residual-N
Vin
L
CRload
SD1
PWM
RL RDRc
RDS
Model-1
Model-2
Model-N
Output
1
2
Vin
L
CRload
RL Rc
RDS
PWM=1
Vin
L
CRload
D1RL RDRc
PWM=0
Vin
L
CRload
RL Rc
RDS
PWM=1
Vin
L
CRload
D1RL RDRc
PWM=0
Vin
L
CRload
RL Rc
RDS
PWM=1
Vin
L
CRload
D1RL RDRc
PWM=0
Vin
Figure 4.8: The detailed block diagram of the boost converter model identifi-cation, 1 depicts the accurate model of the boost converter and 2 shows theMMAE block diagram in Fig. 4.1, where N is the number of models. ThePWM determines whether the top or bottom circuit is switched into the systemat any time
to the following values to operate in CCM mode: L = 330µH,RL = 0.3Ω, Ω, RD = 0.1Ω
and C = 220µF . The input voltage is Vin = 5V , resulting output voltages for various
load resistances are shown in Table 4.5. It is to be noted that, in general, boost converter
with a resistive load, the current always has the same polarity as the voltage, and this
assumption vastly simplifies the design of power circuits in general. However, with a
reactive load, the inductance or capacitance sometimes returns energy to the source,
which means that the current can have the opposite polarity from the voltage at times
during the AC cycle. This is much more difficult to handle in a power circuit. Therefore,
this thesis considered only resistive load as an uncertain parameter.
Chapter 4 Linear Time Variant System Model Identification Architecture 75
4.5 Results and discussion
The proposed architecture RTL was developed in Verilog with bit length bs=32-bit size,
synthesized using the Vivado 2018.2 and prototyped on Virtex ultra-scale plus FPGA
(VCU118). The detailed block diagram is shown in Figure 4.8 where (1) represents the
physical system and (2) represents the MMAE corresponding to Figure 4.1. The ADC
is implemented with the sample rate is taken to be 0.2MHz, i.e. a sample period of
h = 5µs and the sampling is synchronized with the 10kHz PWM signal. The bit size
is selected to retain the boost converter state-space matrices precision while converting
floating pint to fixed-point operation.
The discrete time model [116, 115] is then given by using the Euler’s first order dis-
cretization:
Xp(k + 1) = ApjXp(k) +Bp
j u(k) (4.20)
y(k + 1) = HpjX
p(k + 1) (4.21)
where h is the sample period, and where each of n models 1 ≤ p ≤ N are defined as
follows, where the matrices Apon, Apoff , Bpon, Bp
off , Hpon, Hp
off are dependent of the circuit
parameters for each model (in particular Rload is chosen to be different for each p):
Ap0 = I + hApon (4.22)
Ap1 = I + hApoff (4.23)
Bp0 = Bp
on (4.24)
Bp1 = Bp
off (4.25)
Hp0 = Hp
1 = Hpon = Hp
off (4.26)
i(k) = η(hk) (4.27)
u(k) = Vin (4.28)
y(k) = Vout(hk) (4.29)
This defines the system matrices for each Kalman filter.
4.5.1 Experimental set-up
The experimental setup of the proposed work is shown in Figure 4.9, the continuous
boost converter is emulated in MATLAB and output voltage is sampled at the rate of
0.2MHz, in a single PWM cycle 20 samples were taken. A Xilinx coefficient file (coe)
is used to store the sampled data and subsequently an FPGA BRAM IP is created
to fed Vout to core MMAE architecture on FPGA. The filter bank is operated at the
frequency of fclk=2MHz FPGA is communicated by using Vivado tool with JTAG cable
76 Chapter 4 Linear Time Variant System Model Identification Architecture
Figure 4.9: Experimental setup for FPGA in loop, where coe stands for Xilinxcoefficient
at an operating frequency of 500kHz. The integrated logic analyser (ILA) is used to
collect the computed data from FPGA. The cosponsoring design constraints file is given
in appendix A. To validate the proposed architecture, three case studies were used and
these are discussed in the following sections.
4.5.1.1 Case study-1
In this case, 5 models M1 to M5 with load resistance values R1 = 5Ω (M1), R2 =
10Ω (M2), R3 = 15Ω (M3), R4 = 42Ω (M4), and R5 = 102Ω (M5) were used in
MMAE. The boost converter load switched in following order for every 52msec time
R1, R3, R2, R4, and R5. Initially, boost converter started with 5Ω resistance, at time
instance 52msec load changed to 15Ω and at 54msec proposed architecture identified
as model-3, at 104msec load changed to 10Ω and at 106.1msec proposed architecture
identified as model-2, at 156msec load changed to 42Ω and at 157.6mec proposed ar-
chitecture identified as model-4 and finally at 208msec load changed to 102Ω and at
209.7msec time proposed architecture is identified as model-4. In all instances model
is identified by the proposed architecture. An example illustration is depicted in Fig-
ure 4.10 and corresponding residuals are shown in Figure 4.11, it can be observed that
during the time 0 − 52msec the original boost converter load is 5Ω so the residuals of
model-1 are lesser than remaining models. At 52msec time instance the load changed
Chapter 4 Linear Time Variant System Model Identification Architecture 77
Figure 4.10: Model identification comparison between the original model andidentified by the proposed architecture with load resistance as an uncertainparameter, load started with R1 = 5Ω and changed to R3 = 15Ω at 52msec,R2 = 10Ω at 104msec, R4 = 42Ω at 156msec and at 208msec R5 = 102Ω
to 15Ω due to this residuals of model-3 is started decreasing and residuals for model-1 is
started increasing after 52msec time. A similar trend can be observed in the remaining
instances as well.
0 1 2 3 4 5Time (0.005msec) 104
0
2
4
6
8
10
Resi
duals
105
Res1
Res2
Res3
Res4
Res5
M1 M3
M2 M4M5
Figure 4.11: Residuals plot for the 5 model MMAE architecture with residualswindow size 500 where Resn= residuals for corresponding model number
78 Chapter 4 Linear Time Variant System Model Identification Architecture
Table 4.5: Steady state output voltage for the test loads with the 10kHz and70% duty cycle PWM signal
Model Rload Steady state VoutM1 5Ω 3.87V
M2 10Ω 6.3V
M3 15Ω 7.9V
M4 42Ω 11.9V
M5 102Ω 14.2 V
4.5.1.2 Case study-2
In this experiment, 50 models were used in MMAE to evaluate the proposed architecture
performance. These 50 models are mapped to the load resistance range 1Ω to 105Ω
as shown in Figure 4.12. Boost converter load resistance is changed Rload = 40 +
35sin(wt) where w = 2π/T where T = 260msec. As it can be seen Figure 4.13, the boost
converter original load resistance is changing in sinusoidal form 5Ω to 75Ω within 0 −260msec time-space. For the ease of understanding of the proposed architecture model
identification performance, obtained model numbers are re-mapped to the corresponding
load resistance value and it is plotted in Figure 4.13, it can be observed that it is
closely following the original load resistance. As the load resistance crosses 30Ω, the
difference between load resistance identified by the proposed architecture and original
load resistance is slightly deviating the reason is while mapping boost converter into
the discrete mathematical model the difference between the matrices is decreasing as a
result of this load resistance 30Ω − 32Ω have same state-space model. As load crosses
39Ω this difference increases even more due to this at load resistance 75Ω, proposed
architecture identifies load is 80Ω.
4.5.1.3 Case study-3
In this experiment, 45 models were mapped to the load resistance range 5Ω to 250Ω it
is also illustrated in Figure 4.14. The boost converter load changed with respect to time
between 5Ω to 35Ω in a sinusoidal wave manner and this sinusoidal wave repeated five
times in the time window of 260msec. The load resistance is represented as Rload =
20 + 15sin(wt). The obtained final results of model identification are remapped to load
resistance and the corresponding plot is shown in Figure 4.15. The delay between the
original and identified is induced due to the residuals window size.
4.5.2 Residuals window size impact on model identification time
To show the residuals window size impact on model identification, obtained residuals
were plotted for window size 200 (Res200), 500 (Res500), and 800 (Res800) for case
Chapter 4 Linear Time Variant System Model Identification Architecture 79
4.5.5 Performance analysis in-terms of area, speed and power
The detailed resource utilization comparison between an eight and four multipliers based
DKF architecture is given in Table 4.8. It is observed that, 50% improvement in DSP,
17% improvement in LUTs and 14% in FFs utilization in model identification architec-
ture using the four multipliers based DKF. This 50% DSP utilization reduction achieved
by reducing the number of multipliers from eight to four in the architecture. The pro-
posed architecture reused the four multipliers several times as explained operation in the
above section. Due to this, the four multipliers based DKF architecture number of clock
cycles for each iteration increased from 10 to 15 cycles and both eight and four multi-
pliers based architectures can operate at a maximum frequency of fclk 200MHz system
frequency. However, due to application limitation for these experiments, architecture
is operated at fclk=2MHz. The time required for the proposed architecture to identify
the model after the original physical system changed from one model to another model
is defined as NwNclk/fclk. Where Nw is residuals window size, Nclk is number of clock
cycles required for each DKF iteration and fclk is operating frequency. The proposed
architecture main contribution is for the terms Nclk=10 or 15. The detailed comparison
of model identification time at the various operating frequencies is given in Table 4.7.
It is to be noted that by using the proposed architecture, us order model identification
time can be achieved with the operating frequency of 100 and 200MHz. The high-speed
and lower resource utilization achieved by of proposed method enables the usage of the
proposed architecture on CPS edge computations FPGA platform.
Chapter 4 Linear Time Variant System Model Identification Architecture 83
1.04 1.06 1.08 1.1 1.12 1.14
Time (0.005msec) 104
0
5
10
15
Res
idua
ls
105
M1-Res
200
M1-Res
500
M1-Res
800
M3-Res
200
M3-Res
500
M3-Res
800
T1
T2
T3
Figure 4.16: Model-1 (5Ω) and Model-3 (15Ω) residuals comparison for variouswindow sizes, where Res200, Res500 and Res800 represents the residuals withwindow size of 200, 500, 800 respectively. T1 = 52.9msec, T2 = 53.55msec andT3 = 54.25msec, load is switched from M1 to M2 at 52msec time instance
0.4 0.6 0.8 1 1.2 1.4 1.6Time (0.005msec) 104
0
2
4
6
8
10
Vol
tage
Vmeasured
M1-V
1
M3-V
3
Figure 4.17: Estimated voltage using the proposed architecture when loadchanging from 5Ω to 15Ω, where Vmeasured represents the measured output volt-age from boost converter, M1 − V1 and M2 − V2 represents estimated voltageby using model-1 with 5Ω load and model-2 with 15Ω load respectively
4.5.6 Resource utilization analysis
Resource utilization for the 16, 32, 64, 128 and 256 DKFs in MMAE is given in Table
3.4 3.5 and 3.6, it is observed that as the number of DKFs increases resource utilization
linearly increasing. The proposed architecture was able to accommodate 380 second-
order DKF on Virtex ultra scale+ FPGA, whereas eight multipliers based architecture
84 Chapter 4 Linear Time Variant System Model Identification Architecture
3.5 4 4.5 5
Time (0.005msec) 104
9
10
11
12
13
14
15
Vol
tage
Vmeasured
M4-V
4
M5-V
5
Figure 4.18: Estimated voltage using the proposed architecture when loadchanging from 42Ω to 102Ω, where Vmeasured represents the measured outputvoltage from boost converter, M4−V4 and M5−V5 represents estimated voltageby using model-4 with 42Ω load and model-5 with 102Ω load respectively
Table 4.7: Proposed architecture LTV model identification average time
fclk (MHz)Model identification time8-mul 4-mul
200 25us 37.5us
100 50us 75us
2 2.5msec 3.75msec
Table 4.8: Resource utilization comparison between 8 and 4 multipliers basedarchitecture for single DKF, where mul= multiplier and Nclk is number of clockcycles required for each DKF iteration
Resource 8-mul 4-mul
LUT 1583 1354
FF 618 549
DSP 36 18
Nclk cycles 10 15
accommodated only 190 second-order Kalman filters with 10 clock cycles for each iter-
ation and 461,232(39%) of LUT’s, 322,430 (13.64%) of FF’s, 6840 (100%) of DSP’s and
95 (4.4%) BRAM’s are utilized. On the other hand, four multipliers version architec-
ture utilized 247,161 (7.9%)of LUTs, 241,099 (8.9%) of FFs, 3420 (50%) of DSPs and
95 (4.4%) of BRAMs on VCU118 FPGA with 15 clock cycles for each DKF iteration.
Details of LUTs, FFs and DSPs utilization for various number of models is shown in
Figure 4.19, 4.20 and 4.21 respectively. Note that the percentage is with respect to the
total number of available resources available on VCU118 FPGA. It is evident that the
proposed four multipliers version architecture has reduced 46% of LUTs, 25% of FFs
and 50% DSPs when compared with the 8 multipliers version architecture of filter bank.
Chapter 4 Linear Time Variant System Model Identification Architecture 85
0
100000
200000
300000
400000
500000
600000
16 32 64 128 190 256
8mul 4mul
Figure 4.19: Resource utilization of look-up tables for various number of modelsfrom 1 to 256
0
50000
100000
150000
200000
250000
300000
350000
400000
450000
500000
16 32 64 128 190 256
8mul 4mul
Figure 4.20: Resource utilization of flip-flops for various number of models from1 to 256
4.5.7 Power consumption analysis
In this work, Xilinx power analyser is used to extract the detailed power. The detailed
power consumption is given in Table 4.12. It is observed that 30%, 36%, 25%, 28% and
42% reduction achieved for 16, 32, 64, 128 and 190 models respectively by using the
four multipliers version architecture when compared with an eight multipliers version
architecture in filter banks when operating at 100MHz by penalising the number of clock
cycles for each iteration of DKF and for ease of understanding it also depicted in Figure
4.22, 32% reduction observed in power consumption. For 190 models case the detailed
power consumption analysis between eight and four multipliers version architecture in-
terms of clocks, signals, logic and DSP is given in Figure 4.23. It is to be noted that
86 Chapter 4 Linear Time Variant System Model Identification Architecture
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
16 32 64 128 256 512
Nu
mb
er
of
DSP
s o
n V
CU
11
8
Number of models
DSP
8mul 4mul
Figure 4.21: Resource utilization of DSPs for various number of models from 1to 256
0
2
4
6
8
10
16 32 64 128 190 256
8mul 4mul
Figure 4.22: Power consumption analysis for various number of models from 1to 256
46%, 40% and 46% power reduction achieved for signals, logic and DSP respectively.
4.6 Resource utilization for higher number of models
To estimate resource utilization and power consumption for the higher number of mod-
els, linear regression equation are derived (procedure described in chapter 3 section 3.3)
and final equations are given below (4.32-4.35).
Chapter 4 Linear Time Variant System Model Identification Architecture 87
Table 4.9: Resource utilization comparison in-terms of LUTs between eight mul-tipliers (8-mul) and four multipliers (4-mul) based architectures with respect tothe model size (N). Where N= number of DKF models in MMAE, †=estimatedLUT resources and percentage % with respect to the total number of availableresources on Virtex ultra scale+ FPGA
Model Size (N)LUT
8-mul 4-mul
16 24,859 (2.1%) 20,282 (1.7%)
32 49,422 (4.1%) 40,548 (3.1%)
64 101,312 (8.3%) 86,656 (6.8%)
128 197,908 (16.7%) 162,584 (13.7%)
190 461,232 (38.9%) 241,099 (20%)
256 571,120 (48.1%)† 325,141 (27%)
Table 4.10: Resource utilization comparison in-terms of FFs between eight mul-tipliers (8-mul) and four multipliers (4-mul) based architectures with respect tothe model size (N). Where N= number of DKF models in MMAE, †=estimatedFF resources and percentage % with respect to the total number of availableresources on Virtex ultra scale+ FPGA
Model Size (N)FF
8-mul 4-mul
16 24,516 (1%) 20,853 (0.8%)
32 48,821 (2%) 41,508 (1.7%)
64 97,414 (3.5%) 82,790 (3.39%)
128 195,992 (8.2%) 166,702 (7%)
190 322,430 (13.4%) 247,161 (10%)
256 486,876 (19%) † 332,903 (13.8%)
0
0.5
1
1.5
2
2.5
3
3.5
Clocks Signals Logic DSP
0.404
3.41
2.42
1.57
0.37
1.83
1.44
0.84
8-mul 4-mul
Figure 4.23: Detailed power reduction comparison between eight and four mul-tiplier version filter bank for 190 models MMAE at operating frequency of100MHz. An eight and four multipliers version architecture takes 10 and 15clock cycles respectively
LUT4−mul = 1274.17N + 1381.87 (4.32)
FF4−mul = 1290.99N + 38.47 (4.33)
88 Chapter 4 Linear Time Variant System Model Identification Architecture
Table 4.11: Resource utilization comparison in-terms of DSPs between the 8multipliers (8-mul) and four multipliers (4-mul) based architectures with re-spect to the model size (N). Where N= number of DKF models in MMAE,†=estimated DPSs and percentage % is with respect to the total number ofavailable resources on Virtex ultra scale+ FPGA
Model Size (N)DSP
8-mul 4-mul
16 576 (8.4%) 288 (4.21%)
32 1,152 (16.8%) 576 (8.4%)
64 2,304 (33.6%) 1,152 (16.8%)
128 4,608 (67.3%) 2,304 (33.6%)
190 6,840 (100%) 4,608 (67.3%)
256 9,216 † 6,840 (100%)
Table 4.12: Power consumption comparison between the 8 multipliers (8-mul)and 4 multipliers (4-mul) based architectures with respect to the model size.Where N= number of DKF models in MMAE, †=estimated power and percent-age % is with respect to the total number of available resources on Virtex ultrascale+ FPGA
Model Size (N)Power (W)
8-mul 4-mul
16 0.572 0.4
32 1.13 0.712
64 2.1 1.57
128 4.2 3
190 7.8 4.46
256 10.6 † 6.14
Table 4.13: BRAM utilization for the 8 multipliers (8-mul) based and 4 multi-pliers (4-mul) architectures with respect to the model size. Where N= numberof DKF models in MMAE, % is with respect to the total number of availableresources on Virtex ultra scale+ FPGA
Model Size (N) BRAM for 8-mul/4-mul
16 8(0.37%)
32 16(0.74%)
64 32(1.48%)
128 64(2.96%)
190 95(4.3%)
256 128(5.9%)
DSP4−mul = 18N (4.34)
Power4−mul = 0.02383N + 0.012 (4.35)
Chapter 4 Linear Time Variant System Model Identification Architecture 89
4.7 Discussion
This chapter presented the hardware architecture for linear time-variant CPS model
identification with an eight and four multiplier based DKF in the filter bank of MMAE.
The proposed architecture is validated on the most demanding power electronics appli-
cation and model identification results were presented for the three case studies. Results
were shown that the proposed four multipliers based architecture improved 17% LUTs,
14% FFs, 50% DSPs and 32% power consumption when compared with an eight mul-
tipliers based architecture with a cost of increase in the model identification time. The
proposed architecture is generic and scalable to any filter bank size and it can be oper-
ated at frequency of 100MHz and achieved model identification time in the orders of us
and also broadens the real-time MMAE to power electronics [31, 32], fault detection and
isolation for power electronics devices [33] and batteries [34], state of charge estimation
for batteries [35, 36, 37], high speed train control [38], gas turbain control [39], and nu-
clear power plants [40] applications. Thereby, enhancing the safety and reliability and
reducing the operating cost of CPS applications. This architecture can be used in the
real-time resource-constrained edge computing embedded and cyber-physical systems at
high execution speed. This work broadens the applicability of the LTV model identifi-
cation to the large uncertainty systems, in custom hardware platforms that have been
considered out of reach to date.
Chapter 5
Multiple Model Adaptive
Estimation Based Control with
an application of DC−DC Boost
Converter
The last chapter presented the hardware architecture for LTV system model identifica-
tion based on multiple model adaptive estimation. This chapter presents an investigation
of the EMMSAC approach to regulate DC−DC boost converter output voltage which
involves both model identification and closed-loop control. This is the first-ever at-
tempt to apply EMMSAC for power electronic application. Through the simulations, it
is proven that EMMSAC able identify the load of the DC−DC converter and selected
the right controller from the bank of pre-designed controller set to maintain the target
output voltage. The control objective, i.e. the regulation of the voltage to its reference,
is achieved by directly manipulating the DC-DC converter switch. The simulation re-
sults shows that EMMSAC achieves improved control time, transient and steady-state
performance for DC-DC boost converter in the presence of load resistance uncertainties
when compared to traditional PID controller. The second part of this chapter provides
real-time model identification for the two model-based DC-DC boost converter. To
evaluate the real-time performance of the two benchmarks with various load resistance
values. Through experiments, it is identified that the proposed architecture is taking an
averagely of 0.31msec time to identify the physical system changes.
The organisation of this chapter as follows. Section 5.1 begins the discussion with the
necessity of EMMSAC based control for the boost converter, Section 5.2 provides details
about the proposed methodology, Section 5.3 provides simulation results for various
benchmarks. Section 5.4 discuss the two model-based real-time model identification and
91
92Chapter 5 Multiple Model Adaptive Estimation Based Control with an application of
DC−DC Boost Converter
their implementation details along with final results. Finally, Section 5.5 summarises
the chapter with a discussion.
5.1 Introduction
Over the past decades DC-DC boost converter became ubiquitous in CPS applications
such as photovoltaic (PV) power systems [41], offshore wind turbines (OWT) [42], elec-
[43], medium-voltage DC (MVDC) and high-voltage DC (HVDC) power systems [44, 45],
telecommunication power supply [46], on shipboard power system [47], dc motor drives,
personal computers, home appliances, and portable electronic e.t,c [48, 49]. These con-
verters present several challenges regarding their control issue since modern electronic
systems deeply require high-quality, lightweight, reliable, adaptive, and efficient power
supplies [50, 51]. Early control efforts for these systems contributed to the linear control
methods based on linearised models [117], but it is clear that those control performances
deteriorate under various disturbances in the DC−DC converter circuit. Later research
results are concerned to non-linear control strategies which are frequently studied as
applications into different types of DC−DC converters in the literature, such as back-
stepping control [118], adaptive control [119], model predictive control [120, 121] and
sliding mode control [122], fuzzy logic control [123, 124], optimal control [125], time-
domain design [126], feed-forward control [127, 128] etc. On the other hand, the load
uncertainties in system models are inevitable in practical control problems caused by
modelling errors, uncertain sensor measurement, different operating circumstances, and
so on [129]. Hence, high efficient controllers which pursue smaller steady-state error,
faster dynamical response, lower overshoot are genuinely needed. Besides these common
requirements, the closed-loop control performance of the converter system should have
good uncertainty attenuation ability when system affected by uncertainties and real-
time disturbances [130]. Although existing control approaches have been shown to be
reasonably effective, several challenges have not been fully addressed yet, such as ease
of controller design and tuning, as well as robustness to load parameter variations. In
particular, power electronic applications require control responses in the order of tens
to hundreds of microseconds to work properly [131].
Motivated by the aforementioned challenges this chapter investigates the applicability
of EMMSAC to boost converter [21, 22] for improvising the closed-loop control timing
performance. The main control objective is to regulate the output voltage to the desired
value while rejecting the impact of variations in the load uncertainties. It is be noted
that this is the first-ever attempt to apply EMMSAC in the power electronics domain. It
is to be noted that, an extensive survey on the regulatory controllers used in industries
reveals that 97% of them are of PID structure, due to their simplicity, applicability
Chapter 5 Multiple Model Adaptive Estimation Based Control with an application ofDC−DC Boost Converter 93
and ease of implementations [132]. Therefore, this chapter used the PID controller as a
reference to validate the performance of EMMSAC methodology.
5.2 EMMSAC for DC-DC boost converter
VoltageVout
A/DVin
L
CRload
SD1
PWM
RL RDRc
RDS
Vin
L
CR1
RL Rc
RDS
Vin
L
CR1
D1RL RDRc
S=1
S=0
DKF-1
DKF-2
DKF-N
DKF-3
PWM-1
PWM-2
PWM-N
PWM-3
Residuals-N
Residuals-2
Residuals-1
Residuals-3
Argmin
DSwitch
D/A
Estimator setController set
𝑦0
𝑦2
Figure 5.1: Block diagram of the proposed multiple model adaptive estimationbased control of boost converter, where DKF1, DKF2,−−−DKFN
represents the deterministic Kalman filter which estimates output voltage ofthe boost converter for various load resistance values, N is the number of load
resistors, D is the switching delay
The block diagram of EMMSAC for DC-DC boost converter is shown in Figure 5.1,
major computation units are boost converter model identification and controller acti-
vation unit. In most of the applications, DC-DC boost converter load is unknown and
time-varying. Hence, to control the boost converter efficiently, accurate knowledge of
94Chapter 5 Multiple Model Adaptive Estimation Based Control with an application of
DC−DC Boost Converter
load is necessary. The estimator set shown in Figure 5.1 is identifying the accurate load
resistance of the boost converter. This estimator set is similar to the model identifi-
cation architecture presented in chapter 4. Boost converter estimator set consists of
deterministic Kalman filters and state-space matrices for each of these filters are derived
based on the load resistance value of boost converter during the switch ON and OFF
period for region-1, 2 and 3 as discussed in section 2.7. Based on the difference between
measured (y2) and estimated voltage Kalman filters compute the innovation. The sum-
mation of these innovations over the period of time is called residuals and the smallest
residuals represent the best-matched load of the boost converter. After identifying the
best-matched model, the required PWM signal fed to the boost converter switch from
the bank of the controller unit to maintain the required output voltage. The description
of each unit explained clearly in the following subsections and detailed pseudo-code is
given algorithm 3.
5.2.1 Physical system model set generation
Section 2.7 explained the boost converter operating regions and their corresponding
state-space matrices in the continuous-time domain. Moreover, the operation of the
boost converter is defined by three different state-space matrices, which mainly depend
on the inductor, capacitor and load resistance of the boost converter. In this work,
the load resistance is considered as uncertainty in the physical system, which changes
randomly and the goal of EMMAC is to provide the constant reference output voltage
irrespective of change in the load. This work considered the following L = 330µH,C =
220µF to operate boost converter in CCM mode and by using various load resistances
(Rload), system models are generated. The physical system model shown in Figure 5.1
are defined as
Xp(k + 1) = (I + TsApj )X
p(k) + TsBpj u1 (5.1)
y(k + 1) = HpXp(k + 1) (5.2)
Where p is the system model number ∈ 1, 2, 3, ............N. Apj and Bpj are the physical
system (boost converter) continuous domain state-space matrices and j ∈ on, off1, off2.Boost converter will switch among the three state-space matrices for each PWM cycle.
5.2.2 Control Problem for DC-DC boost converter
The main control objective of the boost converter is to maintain the output of the
boost converter to a reference voltage despite changes in the load resistance. This can
be achieved by controlling the MOSFET switch with a pulse width modulated signal.
Chapter 5 Multiple Model Adaptive Estimation Based Control with an application ofDC−DC Boost Converter 95
Algorithm 3 EMMSAC based controller for DC-DC boost converter
1: Input Apj , B
pj where j ∈ on, off1, off2 and p ∈ 1, 2, ....N l = window size
2: Global variable PWM
3: options = odeset(′MaxStep′, 10−5)
4: for i = 1, i < final time, i = i+ 1 do
5: [t, xcts] = ode23(@cts function name, [t1 : h : t2], xk(r, :), options);
6: xk(i+ 1, :) = xcts(length(t), :);
7: if if(mod(i,Nsamples) == 0) then
8: for p = 1, p < N, p = p+ 1 do
9: State-space matrices selection
10: if PWM = 1 then
11: Ap(i) = Apon
12: Bp(i) = Bpon
13: end if
14: if PWM = 0 and xestimate(i)(1, 1) > 0 then
15: Ap(i) = Apoff1
16: Bp(i) = Bpoff1
17: end if
18: if PWM = 0 and xestimate(i)(1, 1) <= 0 then
19: Ap(i) = Apoff2
20: Bp(i) = Bpoff2
21: end if
22: Continuous to discrete conversion
23: Apk(i) = I +Ap(i)Ts
24: Bpk(i) = Bp(i)Ts
25: Deterministic Kalman filter
26: Ip(i) = y2(i)−HpXpestimate(i)
27: S−1(i) = scaleHpΣp(i)HpT
28: Kp(i) = Σp(i)HpTS−1(i)
29: Xpupdate(i) = Xp
estimate(i) +Kp(i)Ip(i)/scale
30: Σpupdate(i) = Σp(i)−Kp(i)HpΣp(i)/scale
31: Xpestimate(i) = Ap
k(i)Xpupdate(i) +Bp
k(i)u2
32: Σpestimate(i) = Ap
k(i)Σpupdate(i)A
pTk (i) +Bp
k(i)BpTk (i)
33: Rpl (i) =
∑Tw
t=Tw−l ‖Ip(i)‖[HpΣpHpT +1]−1 , Tw ≥ l
34: end for
35: qf (i) = argminpi∈P
(‖Rpl (i)‖) for given l
36: end if
37: Controller activation
38: if if(mod(i, 100) == 0) then
39: PWMout = PWM(qf (i))
40: end if
41: end for
96Chapter 5 Multiple Model Adaptive Estimation Based Control with an application of
DC−DC Boost Converter
During transients, the output voltage should be regulated to its reference value within
Figure 5.3: Comparison between the proposed methodology and PID controllerin-terms of boost converter out voltage and PWM duty cycle, when loadchanged from 25Ω to 8Ω and 8Ω to 55Ω. Benchmark-A1: Rload=8Ω (Model -1),Rload=25Ω (Model-2), Rload=55 Ω (Model-3). Total simulation time 0-200msec,initially boost converter stared with load 25Ω, at time instance 50msec loadchanged to 8Ω and at 100msec load changed to 55Ω. Plots for Benchmark A10were given in appendix B
stared with load resistance 25Ω and both the EMMSAC and PID controllers were set to
default minimum PWM 0.30. After a switching delay of 1msec PID controller PWM
duty cycle changed to 0.32 and EMMSAC is not changed. At the time of 2.52msec
estimator set is identified as original load resistance as model-2. Since the controller
delay is 1msec, EMMSAC takes new model identification value only at 1, 2, 3 ...tn
msec. At the time of 3msec EMMSAC is activated PWM duty cycle 0.54 to maintain
boost converter voltage at 10V whereas PID controller took 19msec time. Similarly, at
time 50msec, boost converter load changed to 8Ω and EMMSAC identified a change in
the model at 50.4msec and at 51msec, PWM duty cycle changed to 0.69 to maintain
output voltage 10V whereas PID controller is reached changed at 73msec. At time
instance 100msec, boost converter load changed to 55Ω and EMMSAC identified the
change in load resistance at 100.5msec and activated PWM duty cycle 0.515 at 101msec
time whereas PID controller is changed its PWM duty cycle at 127.6msec time. The
final output voltage and PWM duty cycle with respect to time are shown in Figure
5.3, it is observed that the EMMSAC methodology is controlling output voltage (10V)
faster than the PID controller with less overshoot and undershoot voltages. Similarly,
ten different benchmarks were evaluated to justify the performance of EMMSAC over
Chapter 5 Multiple Model Adaptive Estimation Based Control with an application ofDC−DC Boost Converter 101
the PID controller and tabulated them in Table 5.2, where closed-loop, required duty
cycle activation time for every load change is given as time (msec). It is observed that
for smaller change in load resistance the closed-loop timing of EMMSAC is improved by
ten times and for larger change in load resistance, EMMSAC improved by twenty times
when compred to the PID controller.
To show the tracking error in terms of residuals ( equation 33 in algorithm 3) between
the boost converter physical system and multiple models for benchmark-A, residuals
plots were shown in Figure 5.4. It is observed that when the physical system load
resistance matches to the corresponding model, its error is less and thereby residuals of
the corresponding model is smaller than the other models. For examples in Figure 5.4,
for the window size 500 between 0 − 50msec time, the physical system load resistance
is matched to model-2 and its residuals is smaller than other models-1, 3. Similarly,
from 50 − 100msec time load resistance is matched to model-1, its residuals is smaller
than the remaining models-2, 3. Finally, from 100−200msec time, physical system load
resistance is matching to model-3 and its residual smaller than the reaming models-1, 2.
5.3.1.2 Residuals window selection
The EMMSAC closed-loop performance depends on model identification time which
directly proportional to the residuals window size and residuals computed by using
equation-33 in algorithm 3. To select appropriate window size for the residuals, several
simulations were carried out with the residuals window size of 100, 200, 300, 400, 500
1000 and these are represented by W100,W200,W300,W400,W500 and W1000 respectively.
For Benchmark-A with load resistance set 8Ω,25Ω, 55Ω obtained residuals were plotted
in Figure 5.4 where R1, R2 and R3 are residuals of model 1, 2 and 3 respectively. It
can be observed that, as the residuals window size increases, the residuals value is also
increasing. To explain impact of window size the same Figure 5.4 is shown for the
shorter time period (100msec to 200msec) in Figure 5.5. With the window size 100
and 200, residuals corresponding to the model-2 and model-3 are overlapping each other
due to this the final output of model identification keep changes between model 2 and 3
and in a closed-loop, the controller block also changes its controller, thereby the boost
converter becomes unstable. As the window size increase 300 and 400 the separation
between model 1 and 2 residuals is also increasing. For window size 500, 1000, residuals
of model 2, 3 are clearly separated thereby output of the model identification unit will be
constant. It to be noted that as the residuals window size increases, model identification
time also increase therefore in this work empirically chosen 500 is the window size for
all benchmarks validation.
102Chapter 5 Multiple Model Adaptive Estimation Based Control with an application of
DC−DC Boost Converter
0 1 2 3 4Time (0.005msec) 104
0
0.5
1
1.5
2
Resid
uals
(V)
105 Window 100
R1
R2
R3
0 1 2 3 4Time (0.005msec) 104
0
1
2
3
4
Resid
uals
(V)
105 Window 200
R1
R2
R3
0 1 2 3 4Time (0.005msec) 104
0
1
2
3
4
5
Resid
uals
(V)
105 Window 300
R1
R2
R3
0 1 2 3 4Time (0.005msec) 104
0
1
2
3
4
5
6
Resid
uals
(V)
105 Window 400
R1
R2
R3
0 1 2 3 4Time (0.005msec) 104
0
1
2
3
4
5
6
Resid
uals
(V)
105 Window 500
R1
R2
R3
0 1 2 3 4Time (0.005msec) 104
0
2
4
6
8
Resid
uals
(V)
105 Window 1000
R1
R2
R3
Figure 5.4: Residuals plots for the 3 model EMMSAC based boost con-verter. Where Rn represents the residuals for model n. Rload=8Ω (Model -1),Rload=25Ω (Model-2), Rload=55 Ω (Model-3). Total simulation time 0-200msec,initially boost converter stared with load 25Ω, at time instance 50msec loadchanged to 8Ω and at 100msec load changed to 55Ω (same graph from time100msec to 200msec is shown in Figure 5.5)
Table 5.4: Boost converter Rload is changed to 2nd at 50msec, 3rd at 100msec,4th at 150msec and 5th at 200msec. ‡ In this case 5th load is switched at230msec
Bench-mark-B
Rload changingorder (Ω) (Ω)
4th loadTime (msec)
5th loadTime (msec)
EMMSAC PID EMMSAC PID
1 ‡ 10, 30, 8, 85, 15 85 152 204 15 231 249
2 10, 18, 70, 7, 35 7 151 171 35 202 210
3 12, 20, 80, 8, 50 8 151 174 50 202 224
4 15, 25, 75, 9, 45 9 151 164 45 203 216
5.3.1.3 Benchmark-B
In this benchmark, the 5 model based EMMSAC were considered, models 1-5 designed
with a load resistance of 8Ω, 10Ω, 15Ω, 30Ω and 85Ω respectively. Controllers were de-
signed to generate PWM duty cycle 0.69, 0.62, 0.57, 0.53 and 0.41 for each associated
load resistance to maintain 10V output voltage. Boost converter load is changed among
the aforementioned five load resistance values within the time window of 270msec. Ini-
tially, the boost converter started with load resistance 10Ω both the EMMSAC and PID
Chapter 5 Multiple Model Adaptive Estimation Based Control with an application ofDC−DC Boost Converter 103
2 2.5 3 3.5 4Time (0.005msec) 104
0
1000
2000
3000
4000
5000
6000
Res
idua
ls (
V)
Window 100
R1
R2
R3
2 2.5 3 3.5 4Time (0.005msec) 104
0
2000
4000
6000
8000
10000
Res
idua
ls (
V)
Window 200
R1
R2
R3
2 2.5 3 3.5 4Time (0.005msec) 104
0
5000
10000
15000
Res
idua
ls (
V)
Window 300
R1
R2
R3
2 2.5 3 3.5 4Time (0.005msec) 104
0
0.5
1
1.5
2
Res
idua
ls (
V)
104 Window 400
R1
R2
R3
2 2.5 3 3.5 4Time (0.005msec) 104
0
0.5
1
1.5
2
2.5
Res
idua
ls (
V)
104 Window 500
R1
R2
R3
2 2.5 3 3.5 4Time (0.005msec) 104
0
1
2
3
4
5
Res
idua
ls (
V)
104 Window 1000
R1
R2
R3
Figure 5.5: Residuals plots for the 3 model EMMSAC based boost converter toobserve the residuals window impact on final residuals values between 100msecto 200msec time (same graph from time 0 to 200msec is also shown in Fig-ure 5.4), where Rn represents the residuals for model n. Rload=8Ω (Model-1), Rload=25Ω (Model-2) and Rload=55Ω (Model-3). Total simulation time 0-200msec, initially boost converter stared with load 25Ω, at time instance 50msecload changed to 8Ω and at 100msec load changed to 55Ω
controller are started with a minimum PWM duty cycle of 0.3. EMMSAC identified load
resistance is equivalent to model-2 at 2.88msec and activated PWM duty cycle 0.62 to
maintain target output voltage (10V) and PID controller reached to 0.64 at 25msec. At
50msec boost converter load is changed to 30Ω, EMMSAC has identified it at 51.1msec
time and activated duty cycle 0.53 at 52msec, whereas PID controller PWM is reached
0.53 at 65msec. Similarly, at 100msec load changed to 8Ω, at 102.5msec EMMSAC is
identified a change in load resistance activated duty cycle 0.69 at 103msec and PID con-
troller changed to the same duty cycle at 125msec. At the time instance 150msec load
changed to 85Ω, EMMSAC identified it 151.1msec as model-5 and activated duty cycle
0.41 at 152msec, whereas PID controller is changed to 0.41 at 202msec time. When the
load changed from 8 to 85Ω, the EMMSAC timing performance is 26 times higher than
the PID controller. Finally, at 230msec load changed from 85Ω to 15Ω, EMMSAC iden-
tified it at 230.45msec and activated PWM duty cycle 0.57 at 231msec, whereas PID
104Chapter 5 Multiple Model Adaptive Estimation Based Control with an application of
DC−DC Boost Converter
00
.51
1.5
22
.5
10
5
0 2 4 6 8
10
12
14
16
Voltage(V)
vo
ut E
MM
SA
C
v o
ut P
ID
00
.51
1.5
22
.5T
ime (u
s)1
05
0.2
0.3
0.4
0.5
0.6
0.7
PWM
EM
MS
AC
PW
MP
ID P
WM
Figu
re5.6
:B
ench
mark
-B:
5m
od
elb
asedE
MM
SA
Cclosed
loop
comp
arisonb
etween
the
prop
osedm
ethod
ologyan
dP
IDcon
trollerin
-terms
boost
converter
ou
tvo
ltage
an
dPWM
signal,
Vin
=5V
andVout
=10V
.in
itiallyE
MM
SA
CP
IDPWM
arestarted
with
defau
ltPWM
du
tycy
cle0.3
0.
Loa
dresistan
ce(R
load )
chan
gesfrom
10Ωto
30Ωat
50msec,
30Ωto
8Ωat
100msec,
8Ωto
85Ωat
150msec
an
d85Ω
to15
Ωat
230msec
Chapter 5 Multiple Model Adaptive Estimation Based Control with an application ofDC−DC Boost Converter 105
controller reached at 251msec. It is observed that when load changed from 85 to 15Ω
EMMSAC timing performance is 20 times higher than the PID controller. The output
voltage and PWM duty cycle with respect to time are depicted in Figure 5.6. Similarly,
4 different benchmarks were evaluated to justify the performance of the EMMSAC over
PID controller and tabulated them in Table 5.3 for load 1-3 and Table 5.4 for load 4-5,
where closed-loop controller activation time for every load change is given in msec.
5.3.2 Wrong controller effect on model identification
Figure 5.7: Plot to show the effect of EMMSAC when wrong controller activated,when load changes from 25Ω to 8Ω and 8Ω to 55Ω. Benchmark-A1: Rload=8Ω(Model -1), Rload=25Ω (Model-2), Rload=55 Ω (Model-3). Total simulationtime 0-200msec, initially boost converter stared with load 25Ω, at time instance50msec load changed to 8Ω and at 100msec load changed to 55Ω
To show the effect of the wrong controller on EMMSAC model identification perfor-
mance, simulations were performed on Benchmark-1 with load resistance 8, 25 and 55Ω
(Model-1, 2, 3). Controller set pulse width values 0.69, 0.54 and 0.515 are used, these
values are corresponding to the model 1, 2 and 3 respectively to maintain targeted output
voltage 10V. However, in this experiment model-1, 2, 3 are controlled by controller-2, 1,
3 respectively to observe the model identification performance. The system change order
is 2, 1, 3 and the corresponding controller PWM order is 3, 1 and 2. Initially, the boost
converter started with load 25Ω and at the time 2.52msec EMMSAC identified load
is corresponding to model-2, at 3msec time instant controller is activated controller-2
duty cycle 0.69. At time instance 50msec boost converter load changed from 25Ω to 8Ω.
At 50.55msec EMMSAC identified as model-1 and 51msec controller-1 duty cycle 0.515
106Chapter 5 Multiple Model Adaptive Estimation Based Control with an application of
DC−DC Boost Converter
is activated. Finally, the load resistance is changed from 8Ω to 55Ω at 100msec time
instance and EMMSAC identified as model-3 at 101.4msec time instance and activated
the controller-2 PWM at the 102msec time instance. The output voltage and duty
cycle plots are shown in Figure 5.7 due to the wrong controller activation, the output
voltage is not regulated to targeted voltage however, model identification is performed
accurately.
5.4 Two model based real time model identification
This experiment aims to investigate the performance of model identification when the
system running with completely two opposite models. The detailed block diagram is
given Figure 5.1. The LTV model identification presented in Chapter 4 is reused in the
estimator set. DKF Model-1 is running with Hp1=[0, 1] and DKF model-2 is running
with Hp2=[0, -1]. The measured boost converter output voltage (Vmeasured) is given to
the model identification unit. Boost converter specifications:
Input voltage=5V
Inductance L = 326uH
Capacitance C = 204uF
Diode forward resistance RDS = 0.2
Inductor internal resistance RL = 0.3ohm
Operating frequency fpwm = 10kHz
Target output voltage Vref = 10V
The experimental setup block diagram is shown in Figure 5.8, by using ADC boost con-
verter output voltage is sampled at the rate of 0.2MHz and PWM value is generated by
using DAC module. The filter bank is operated at a frequency of fclk = 2MHz, FPGA
is communicated by using Vivado tool with JTAG cable at a frequency of 500kHz. A
dip switch on FPGA is used to change the physical system sign. The integrated logic
analyser is used to collect the computed data from FPGA. The real-time experimental
setup is shown in Figure 5.9 which shows FPGA and boost converter along with AD-
C/DAC interconnections. A detailed description of each block is given in the following
subsections.
5.4.1 ADC implementation on VCU118 FPGA using AD7476A
The real-time boost converter output voltage is sampled by using the ADC IC AD7476A
(12bit) used for analog to digital conversion. AD7476A is a successive approxima-
tion ADC, the input and output pins of AD7476A and FPGA interfacing pins are
shown in Figure 5.10. FPGA PMOD female head (J52) pins-0, 1, 2, 3, GND and Vcc
are used for connecting the ADC. Since it is a two-channel ADC, it has 2 analog in-
puts (Analog1, Analog2), the node which we are intended to measure its voltage is to
Chapter 5 Multiple Model Adaptive Estimation Based Control with an application ofDC−DC Boost Converter 107
Figure 5.8: Block diagram of the experimental setup
Figure 5.9: Real-time experimental setup
be connected to Analog1orAnalog2. The ADC operating voltage range is 2.2V to 3.3V,
therefore we need to use a voltage divider. In these experiments, R1 = 10kΩ and
R2 = 2.2kΩ are used for the voltage divider, voltage is measured between the 2.2kΩ and
ground.
The communication between ADC and FPGA is established by using the serial periph-
eral interface (SPI) protocol. Handshaking is involved based on the signals chip select
(CS) and system clock (Sclk). The detailed timing diagram is given in Figure 5.11.
108Chapter 5 Multiple Model Adaptive Estimation Based Control with an application of
DC−DC Boost Converter
ADC
Analog1
GND
Analog2
GND
GND
Vcc
GND
Vcc
Sclk
Input
Data1
Data2
CS
Output
Vcc
FPGA PMODFemale Head(J52)GND
0
1
2
3
Figure 5.10: ADC input/output pin details
Figure 5.11: ADC timing (Source: AD7476A data sheet [4])
Based on this timing diagram a state machine based SPI protocol RTL code was de-
veloped. The detailed readings for input voltage 0.25V to 3.25V is given in Table 5.5.
This module took 28 clock cycles for each conversion. The implemented design utilized
30 LUT’s and 65 FF’s on FPGA.
5.4.2 DAC implementation on VCU118 FPGA using AD7303
In general control signals generated by the hardware control unit are in the digital
domain, these signals must be converted into the analog domain to control the physical
system. Therefore, analog devices 8-bit DAC AD7303 was used in these experiments to
convert digital data into analog. The input-output pin and interfacing with the FPGA
diagram are shown in Figure 5.12. To connect DAC module top FPGA PMOD male
head (J53) pins-4, 5, 6, 7, GND and Vcc are used.
Chapter 5 Multiple Model Adaptive Estimation Based Control with an application ofDC−DC Boost Converter 109
Table 5.5: ADC module output data (Input range 0v-3.3v and output range0-4096)
Input Voltage (V) ADC data
0.25 310
0.5 620
1 1241
1.25 1551
1.5 1861
1.75 2174
2 2482
2.5 3102
3 3723
3.25 4033
DAC
Analog1a
Analog1b
GND GND
Vcc
Sclk
Input
Data1
Data2
CS
Output
Analog2a
Analog2a
VccVcc
FPGA PMODmale Head(J53)
GND
4
5
6
7
Figure 5.12: DAC input/output pin details
Figure 5.13: Timing digram of DAC AD7303 (Source AD7303 data sheet [5] ).
The communication between DAC and FPGA is established by using the serial peripheral
interface protocol. Handshaking is involved based on the signals CS and Sclk. The
detailed timing diagram is given in Figure 5.13. This module took 18 clock cycles to
convert 8-bit data.
110Chapter 5 Multiple Model Adaptive Estimation Based Control with an application of
DC−DC Boost Converter
5.4.3 Moving Average Filter
Ma(n) =ad(n) + ad(n− 1) + ad(n− 2) + ad(n− 3)
4(5.5)
The measured output voltage must be filtered before sending it to the MMAE unit. The
filtering step is performed using a simple four tap moving average (MA) filter (given
in equation 5.5), where ad is ADC 12-bit output data. This filter removes the noise
introduced by ADC. This architecture is shown in Figure 5.14 and coded in Verilog and
it is utilized 35 LUT’s and 82 FF’s on VCU118 FPGA.
n n-2 n-3
++
+
n-1
Shift RegisterADC data
>>2 >>2
Output
Figure 5.14: Proposed moving average filter architecture
5.4.4 PWM signal generator
Counterclk Comparator
PWMin
DAb ‘1 Comparator
Reset
DAb ‘0 DAC module inputMax count
1
0
Figure 5.15: Proposed PWM signal generation architecture
In this work, a counter-based PWM is implemented, the design mainly uses a counter
and comparator. The count value is compared with reference PWMin in every clock
cycle, the output of the comparator is given to a mux to send output either zero or
one as shown in Figure 5.15. The second comparator is responsible to reset the count
value after reaching the maximum count. In Figure 5.15, DAb is the DAC module bit
length, max count is used to adjust the PWM signal frequency and PWMin is used
for changing the pulse width of PWM signal. The counter is set to reset when the
count reaches the max count value. It is be noted that the DAC module is an 8-bit I/O
Chapter 5 Multiple Model Adaptive Estimation Based Control with an application ofDC−DC Boost Converter 111
module, so to generate the logic high signal, the design sent all 8-bits as ones and zero
to generate logic zero signal. The implemented design utilised 37 LUT’s and 30 FF’s on
FPGA.
5.4.5 Obtained results
Table 5.6: Real-time closed loop model identification time for various load re-sistance values
Load resistance (Ω)System 1 to 2 System 2 to 1no. of samples Time (msec) no. of samples Time (msec)
33 62 0.31 64 0.32
40 64 0.32 65 0.32
50 64 0.32 63 0.31
60 63 0.31 64 0.32
68 63 0.31 63 0.31
89 61 0.30 64 0.30
100 62 0.31 63 0.31
Average time 0.31 0.31
0 2000 4000 6000 8000 10000 12000-15
-10
-5
0
5
10
15
Vol
atge
Measured and estimated voltage for load 33ohm
0 2000 4000 6000 8000 10000 12000
Time (0.005msec)
-15
-10
-5
0
5
10
15
Vol
atge
Measured and estimated voltage for load 40ohm
V1
V2
Vmeasured
Figure 5.16: Plot to show the real-time measured and estimated voltages forthe model identification when model changed from system-1 to system-2, whereVmeasured represents the measured boost converter output voltage, V1 representsestimated voltage by model-1 and V2 represents estimated voltage by model-2
To validate the performance of the two model based model identification, experiments
were conducted under various Rload conditions. Estimated and measured voltage plots
are shown in Figure 5.16 and 5.17 for load resistance 33Ω when system changed 1 to
112Chapter 5 Multiple Model Adaptive Estimation Based Control with an application of
DC−DC Boost Converter
0 2000 4000 6000 8000 10000 12000-15
-10
-5
0
5
10
15
Vol
atge
Measured and estimated voltage for load 33ohm
0 2000 4000 6000 8000 10000 12000
Time (0.005msec)
-15
-10
-5
0
5
10
15
Vol
atge
Measured and estimated voltage for load 40ohm
V1
V2
Vmeasured
Figure 5.17: Plot to show the real-time measured and estimated voltages for themodel identification when the model changed from system-2 to system-1. whereVmeasured represents the measured boost converter output voltage, V1 representsestimated voltage by model-1 and V2 represents estimated voltage by model-2
Figure 5.18: Residuals and model identification plots with load resistance 33Ω,when the system changed from 1 to 2. At time instance 32.77msec systemchanged from 1 to 2, after 0.31msec time EMMSAC identified the change inmodel
Chapter 5 Multiple Model Adaptive Estimation Based Control with an application ofDC−DC Boost Converter 113
Figure 5.19: Residuals and model identification plots with load resistance 33Ω,when the system changed from 2 to 1. At time instance 32.77msec systemchanged from 1 to 2, after 0.32msec time EMMSAC identified the change inmodel
2 and 2 to 1 respectively. It is observed that in all cases DKFs are achieving 99%
estimation accuracy.
Furthermore, to show the model identification performance for the 33Ω load resistance,
the time difference between system switch and EMMSAC identification and the number
of samples taken by EMMSAC for model identification when EMMSAC switched from
system-1 to system-2 and system-2 to system-1. Residuals and model identification are
plotted in Figure 5.18, at time 32.77msec system changed from 1 to 2, residuals of model-
1 started increasing and after 62 samples or 0.31msec time model-2 residuals crossed
the model -1 residuals and model identification output also changed. Residual and
model identification plots when the system changed from 2 to 1 is shown in Figure 5.19.
Similarly, the system changed from 2 to 1 at 32.77msec and it is identified at 33.09msec
time, it has taken 64 samples. Similarly, for the remaining cases, model identification
time and the number of samples are tabulated in Table 5.6. The corresponding graphs
for each load resistance were also plotted in Figure 5.20, when the physical system
changed from 1 to 2 and in Figure 5.21 when the physical system changed from 2 to
1. The average model identification time when the system switched from 1 to 2 is
0.313msec and from 2 to 1 it is 0.318msec time. It is to be noted that the main aim of
these experiments is to validate the real-time model identification performance i.e. how
quickly change in the physical system is identified by the proposed architecture. For
example, when the physical system switched from system-1 to system-2, it is identified
114Chapter 5 Multiple Model Adaptive Estimation Based Control with an application of
DC−DC Boost Converter
Figure 5.20: Plots to show the time difference between the original model (OM)and identified model (IM) when physical system changed from 1 to 2 underload resistance Rload 33Ω, 40Ω, 50Ω, 60Ω, 68Ω, 89Ω and 100Ω. Model iden-tification time 0.32, 0.32, 0.31, 0.32, 0.31, 0.32 and 0.31msec respectively foraforementioned load resistances
within 0.31msec time as shown in Figure 5.18. If the change in the physical system
is not identified, the identified model number in Figure 5.18 would have not changed
from model 1 to 2. Therefore from these experiments, it is concluded that the proposed
architecture could identify the model.
5.5 Discussion
This chapter presented the multiple model adaptive estimation based controller for the
DC−DC boost converter. A model identification scheme is implemented to identify a
Chapter 5 Multiple Model Adaptive Estimation Based Control with an application ofDC−DC Boost Converter 115
Figure 5.21: Plots to show the time difference between the original model (OM)and identified model (IM) when physical system changed from 1 to 2 underload resistance Rload =33Ω, 40Ω, 50Ω, 60Ω, 68Ω, 89Ω and 100Ω. Model iden-tification time 0.31, 0.32, 0.32, 0.31, 0.31, 0.30 and 0.31msec respectively foraforementioned load resistances
boost converter model under load resistance uncertainties. This is the first attempt to
use the EMMSAC for power electronic applications. It was shown that the EMMSAC
significantly improves the closed-loop output voltage response time and settling time
when compared to PID controller and it is demonstrated by the simulation results by
changing the load resistance of the boost converter abruptly. It is identified that the
EMMSAC method control time averagely improved by 10 times for a smaller change in
load and 20 times improvement for a larger change in load. Due to improved closed-loop
timing performance and the results of the proposed simulation will enable the use of
EMMSAC for wider applications such as applications photovoltaic (PV) power systems
116Chapter 5 Multiple Model Adaptive Estimation Based Control with an application of
Figure B.1: Comparison between the proposed methodology and PID con-troller in-terms boost converter out voltage and PWM duty cycle, when loadchanges from 30Ω to 8Ω and 8Ω to 60Ω. Benchmark-A1: Rload=8Ω (Model -1),Rload=30Ω (Model-2), Rload=60 Ω (Model-3). Total simulation time 0-200msec,initially boost converter stared with load 30Ω, at time instance 50msec loadchanged to 8Ω and at 100msec load changed to 60Ω
Appendix B Boost converter circuit parameter comparison 127
0 1 2 3 4Time (0.005msec) 104
0
0.5
1
1.5
2
Res
idua
ls
105 Window 100
R1
R2
R3
0 1 2 3 4Time (0.005msec) 104
0
1
2
3
4
Res
idua
ls
105 Window 200
R1
R2
R3
0 1 2 3 4Time (0.005msec) 104
0
2
4
6
Res
idua
ls
105 Window 300
R1
R2
R3
0 1 2 3 4Time (0.005msec) 104
0
2
4
6R
esid
uals
105 Window 400
R1
R2
R3
0 1 2 3 4Time (0.005msec) 104
0
2
4
6
Res
idua
ls
105 Window 500
R1
R2
R3
0 1 2 3 4Time (0.005msec) 104
0
2
4
6
8
Res
idua
ls
105 Window 1000
R1
R2
R3
Figure B.2: Residuals plots for 3 model EMMSAC based boost converter.Where Rn represents the residuals for model n. Rload=8Ω (Model-1), Rload=30Ω(Model-2), Rload=60 Ω (Model-3). Total simulation time 0-200msec, initiallyboost converter stared with load 30Ω, at time instance 50msec load changed to8Ω and at 100msec load changed to 60Ω
References
[1] A. A. Cardenas, S. Amin, and S. Sastry, “Secure control: Towards survivable
cyber-physical systems,” in Distributed Computing Systems Workshops, 2008.
ICDCS’08. 28th International Conference on, pp. 495–500, IEEE, 2008.
[2] D. Buchstaller, Robust stability and performance for multiple model switched adap-
tive control. PhD thesis, University of Southampton, 2010.
[3] C. Maxfield, The design warrior’s guide to FPGAs: devices, tools and flows. El-
sevier, 2004.
[4] A. Devices, “Data sheet of ad7476.” https://www.analog.com/en/products/
ad7476.html#.
[5] A. Devices, “Data sheet of ad7303.” https://www.analog.com/media/en/
technical-documentation/data-sheets/AD7303.pdf.
[6] A. Gatouillat, Y. Badr, B. Massot, and E. Sejdic, “Internet of medical things: A
review of recent contributions dealing with cyber-physical systems in medicine,”
IEEE Internet of Things Journal, vol. 5, no. 5, pp. 3810–3822, 2018.
[7] S. ur Rehman and V. Gruhn, “An approach to secure smart homes in cyber-
physical systems/internet-of-things,” in 2018 Fifth International Conference on
Software Defined Systems (SDS), pp. 126–129, IEEE, 2018.
[8] C. F. Konig, G. Meisl, N. Balcu, B. Vosseler, H. Hormann, J. Holl, and V. Faßler,
“Engineering of cyber-physical systems in the automotive context: case study of
a range prediction assistant,” in International Symposium on Leveraging Applica-
tions of Formal Methods, pp. 461–476, Springer, 2018.
[9] K. Sampigethaya, “Aircraft cyber security risk assessment: Bringing air traffic
control and cyber-physical security to the forefront,” in AIAA Scitech 2019 Forum,
p. 0061, 2019.
[10] X. Yu and Y. Xue, “Smart grids: A cyber–physical systems perspective,” Proceed-
ings of the IEEE, vol. 104, no. 5, pp. 1058–1070, 2016.