How to create a custom capacitor with changing distance between capacitor plates?

2 views (last 30 days)
Hello.
How to create a custom capacitor with changing distance between capacitor plates?
Excuse for troubling.
component capacitor
nodes
p = foundation.electrical.electrical; % +:top
n = foundation.electrical.electrical; % -:bottom
end
inputs
d2 = { 0.01, 'mm' }; % :bottom
end
parameters
d1 = { 0.01, 'mm' };
C0 = { 1, 'F' }; % Nominal capacitance C0 at V=0
Cv = { 0.2, 'F/V'}; % Rate of change of C with voltage V
R = {2, 'Ohm' }; % Effective series resistance
Rd = {500, 'Ohm' }; % Self-discharge resistance
end
variables
i = { 0, 'A' }; % Current
vc = {value = { 0, 'V' }, priority = priority.high}; % Capacitor voltage
end
branches
i : p.i -> n.i; % Through variable i from node p to node n
end
equations
assert(C0 > 0)
assert(R > 0)
assert(Rd > 0)
let
v = p.v-n.v; % Across variable v from p to n
in
v == vc;
i == (C0*k)*der(vc*(d2/d1));
% k = e*e0*S/d2
end
end
end
  1 Comment
Alexander Vasilev
Alexander Vasilev on 7 May 2021
v == vc*(d2/d1);
i == C0*der(v);
% k = e*e0*S/d2
Don't work too.
Voltage does not increase.
For simplicity, I have not changed the capacity yet.

Sign in to comment.

Accepted Answer

David John
David John on 3 Aug 2021
If you want to change the capacitance based on an input, you can have something like
i == C0*d1/d2*vc.der;
I'm not sure what you mean when you say that "the voltage does not increase". If you can share your test model, I can probably comment on that as well.
  1 Comment
David John
David John on 3 Aug 2021
By the way, if you have Simscape Electrical, then there is a "Variable Capacitor" block that does something similar to what you want.

Sign in to comment.

More Answers (0)

Categories

Find more on Electrical Sensors in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!