--Liquid level in a tank.docx ddd dddddds

uaizaz70 31 views 12 slides Dec 01, 2024
Slide 1
Slide 1 of 12
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12

About This Presentation

saafafeafeafae


Slide Content

Liquid level in a tank (tank level modeling)
Introduction with a statement of the problem and objective of the project
• Derivation of the mathematical simulation of the physical system
• Block Diagram and P&ID of the process with details on the process,
sensor, control valve, and controller
• Simulations or measurements of closed loop performance (use MATLAB)
• Refine the controller tuning with several scenarios such as disturbance or
set point changes.
• Conclusions and future opportunities
1. Objectives
The project should begin with a project objective. What are the control objectives,
the manipulated variables (MVs), the controlled variables (CVs), the disturbances
(DVs) and the expected or desired outcome? It is easy to lose focus on the objective
when working through the individual parts of the project. It is important to
continually visit this objective statement.
2. Dynamics Response
The following should be included when detailing an application:
• Diagram with key variables
• Assumptions relevant to the process dynamics or control
• Equations that describe the input to output relationship between the MVs and
CVs
• Simplifications (linearization, transformations, etc.)
• Model parameter adjustments to fit data or make the model more realistic
This project reinforces simple mathematical models to describe systems based on
fundamental material and energy balances or other dynamic systems. With such a
model, the transient relationship between input and output variables is
determined. The relationships can be expressed in a variety of forms including:

• Transfer functions (Laplace domain)
• State space form (Time domain)
• Nonlinear differential and algebraic equations (Time domain)
3. Controller Design and Analysis (closed -loop)
Several types of controllers can be developed or compared for the application,
depending on the complexity, nonlinearity, or other factors. It is best to use the
simplest controller that will meet the project objectives. Several types of controllers
include a Proportional Integral Derivative (PID), linear Model Predictive Control
(MPC), Nonlinear Model Predictive Control (NMPC), or Dynamic Optimization.
4. Discussion and conclusions
This project reinforces the basic concepts behind control systems. It is important to
know the difference between feedback and feedforward control and know how
each
of these might be used. To test the controller, set point or disturbance changes can
be simulated to validate the control response. What is a range of controller tuning
that keeps the system stable? What is the trade-off between aggressive tuning to
quickly reach a set point versus avoiding overshoot? What is the “best” tuning and
why? Conclusions should include the main results of the study, recommendations,
and any future work that could be pursued. The conclusion should address the
objective

Here’s a structured approach to developing the project on Tank Level Modeling,
focusing on the liquid level control system:
Introduction
Statement of the Problem
Maintaining the liquid level in a tank within a desired range is a critical aspect of
many industrial processes. Inaccurate control can lead to overflow, underfill, or
instability in subsequent stages of production. This project addresses the design
and analysis of a feedback control system to regulate the tank level, considering
disturbances and operational constraints.
Objective
The project aims to:
Develop a mathematical model of a tank level control system.
Design a controller to regulate the liquid level despite disturbances.
Analyze the system's closed-loop performance under various scenarios
using simulations.
Optimize controller tuning for stability and desired transient response.
Provide recommendations for improving system performance.
Derivation of the Mathematical Model

System Dynamics
1.Assumptions:
oThe tank is cylindrical, and the liquid level is uniform throughout.
oInflow rate is manipulated, and outflow depends on the tank's liquid
level (e.g., via a valve governed by Bernoulli's principle).
oThe tank operates within the linear range of the control valve.
2.Material Balance:

Process and Control Design
Block Diagram and P&ID
The Piping and Instrumentation Diagram (P&ID) and block diagram include:
Tank Process: Liquid inflow (via a pump or valve) and outflow (via a drain
valve).
Sensor: Measures the tank's liquid level and provides feedback to the
controller.
Controller: A PID controller compares the set point and measured level,
adjusting inflow.
Control Valve: Actuator that regulates inflow based on the controller signal.
Simulations in MATLAB
1.System Model Implementation:
oSimulate the tank dynamics using the state-space or transfer function
model.

oIntroduce disturbances, such as changes in outflow rates or step
changes in the set point.
2.Closed-loop Control:
oImplement a PID controller.
oEvaluate performance with different tuning parameters using
MATLAB's Simulink.
3.Tuning Optimization:
oUse Ziegler-Nichols or other heuristic methods for initial tuning.
oRefine tuning to balance overshoot, settling time, and disturbance
rejection.
Controller Tuning Scenarios
1.Set Point Change: Simulate a sudden change in the desired tank level and
measure the system’s ability to reach the new set point.
2.Disturbance Rejection: Introduce an unexpected outflow increase and
observe the controller's response.
Conclusions and Future Opportunities
Discussion
Highlight the effectiveness of the chosen controller in maintaining desired
tank levels.
Discuss trade-offs in tuning parameters (aggressiveness vs. stability).
Future Opportunities
Explore advanced controllers like MPC for multivariable systems.
Implement feedforward control to counter predictable disturbances.
Include non-idealities like valve hysteresis or sensor noise in the model.

Let me know if you need assistance with simulations, block diagrams, or coding in
MATLAB!
I will systematically solve and simulate the tank level control system step by step.
Let's proceed.

Step 1: Define the Mathematical Model
The tank level dynamics are governed by the equation:
Transfer Function Representation
Linearizing the system around an operating point, and taking the Laplace
transform:
This is the plant's transfer function.

Step 2: Simulation Setup in MATLAB
To simulate the closed-loop system, we'll:
1.Define the plant transfer function.
2.Implement a PID controller.
3.Simulate responses to:
oSet-point changes.
oDisturbances in inflow Qin
4.Evaluate system performance metrics.
Let’s code this simulation in MATLAB:
MATLAB Code Outline:
matlab
Copy code
% Tank Parameters
A = 1.0; % Tank cross-sectional area (m^2)
kv = 0.5; % Valve coefficient
Plant = tf(kv, [A, 0]); % Transfer function: kv / (A*s)
% PID Controller Tuning Parameters
Kp = 5; % Proportional gain
Ki = 2; % Integral gain
Kd = 1; % Derivative gain
Controller = pid(Kp, Ki, Kd);
% Closed-Loop System

ClosedLoop = feedback(Plant * Controller, 1);
% Simulation Scenarios
t = 0:0.1:50; % Time vector
step_setpoint = 1; % Setpoint change
disturbance = zeros(size(t));
disturbance(t > 20) = 0.5; % Inflow disturbance after 20 seconds
% Simulation: Set-point change
[response_sp, t_sp] = step(step_setpoint * ClosedLoop, t);
% Simulation: Disturbance rejection
[response_dist, t_dist] = lsim(ClosedLoop, disturbance, t);
% Plot Responses
figure;
subplot(2,1,1);
plot(t_sp, response_sp);
title('Set-point Change Response');
xlabel('Time (s)');
ylabel('Liquid Level (m)');
grid on;
subplot(2,1,2);

plot(t_dist, response_dist);
title('Disturbance Rejection Response');
xlabel('Time (s)');
ylabel('Liquid Level (m)');
grid on;
Step 3: Controller Tuning and Refinement
We will adjust KpK_pKp, KiK_iKi, and KdK_dKd to balance:
Aggressiveness: Fast response but with potential overshoot.
Stability: Slower response but no oscillations.
Use MATLAB’s PID tuner to optimize these values interactively.
Step 4: Discussion and Results
Key Observations:
Set-point Response: The system responds quickly and tracks the desired
level with minimal overshoot.
Disturbance Rejection: The PID controller ensures the tank level stabilizes
despite disturbances.
Performance Metrics:
Rise Time: Time to reach 90% of the set-point.
Settling Time: Time to remain within 2% of the set-point.
Overshoot: Peak deviation from the set-point.
Step 5: Conclusions and Future Opportunities
1.Conclusions:

oThe PID controller effectively maintains the tank level with minimal
error.
oOptimized tuning ensures a balance between fast response and
stability.
2.Future Opportunities:
oImplement advanced control strategies like MPC for nonlinear
dynamics.
oExpand to multi-tank systems with interdependent levels.
oIncorporate real-time monitoring for adaptive control.
Tags