current
Syntax
Description
current(
calculates and plots the absolute value of the current on the metal surface of a
PCB component at the specified frequency.rfpcbobject
,frequency
)
calculates the x, y, z
components of the current on the surface of a PCB component at a specified
frequencies.i
= current(rfpcbobject
,frequency
)
[
returns the current distribution and the points at which the current calculation
was performed.i
,p
] = current(rfpcbobject
,frequency
)
current(
calculates and plots the absolute value of the current at the specified
frequency on the dielectric surface of the PCB component.rfpcbobject
,frequency
,'dielectric')
calculates the x, y,
z components of the current on the dielectric surface of a PCB
component at the specified frequency.i
= current(rfpcbobject
,frequency
,'dielectric')
calculates the current on the surface of a PCB component using additional
name-value arguments.i
= current(___,Name=Value
)
Examples
Calculate Current Distribution on Rat-Race Coupler
Create a rat-race coupler with default properties.
coupler = couplerRatrace;
Set the excitation voltage and the phase angle at the ports of the coupler.
v = voltagePort(4)
v = voltagePort with properties: NumPorts: 4 FeedVoltage: [1 0 0 0] FeedPhase: [0 0 0 0] PortImpedance: 50
v.FeedVoltage = [1 0 1 0]
v = voltagePort with properties: NumPorts: 4 FeedVoltage: [1 0 1 0] FeedPhase: [0 0 0 0] PortImpedance: 50
v.FeedPhase = [90 0 270 0]
v = voltagePort with properties: NumPorts: 4 FeedVoltage: [1 0 1 0] FeedPhase: [90 0 270 0] PortImpedance: 50
Calculate and plot the current on the coupler at 3 GHz.
figure current(coupler,3e9,Excitation=v,Type='real',Direction='on')
Calculate Current Distribution on Spiral Inductor
Create a default spiral inductor.
inductor = spiralInductor; show(inductor)
Calculate the current distribution on the inductor at 600 MHz.
[i,p] = current(inductor,600e6)
i = 3×242 complex
-1.5922 + 2.4296i -1.2993 + 2.0267i -0.7940 + 1.0474i -0.0003 + 0.0074i 0.0000 - 0.0067i -1.6421 + 2.5516i 1.3974 - 1.9829i 0.1289 - 1.2235i 1.9091 - 2.4443i 0.1875 - 0.2615i 0.0022 - 0.0279i -0.0005 + 0.0075i -0.2745 + 0.5834i 2.3139 - 3.6287i 0.8341 - 1.3729i -0.2731 + 0.5928i 2.3125 - 3.6056i 1.5493 - 2.2732i 2.8618 - 4.0426i 0.3477 - 0.6862i 11.3346 -14.1429i 1.3039 - 2.2525i 1.3067 - 2.3101i 2.6114 - 4.0805i 1.1166 - 1.5083i 0.1318 - 0.2257i 4.2366 - 8.0160i 3.2848 - 6.0731i 1.1301 - 1.9182i 0.8343 - 1.3677i 0.0171 - 0.2046i -1.7151 + 2.7047i -0.9376 + 1.4702i 0.0967 - 0.3237i -2.3156 + 3.3929i 2.5015 - 3.3752i -1.9228 + 3.0223i 0.2122 - 0.2979i 1.8457 - 3.0609i 0.7208 - 1.0432i 0.2664 - 0.3922i 0.2119 - 0.3029i 3.2053 - 5.9908i 2.5742 - 4.6861i 1.4204 - 2.4247i 1.0551 - 1.7422i 0.0632 - 0.2680i 0.0400 - 0.2262i -1.8682 + 3.0825i 0.2679 - 0.4113i
-0.0000 + 0.0054i 0.0351 - 0.0329i 0.2992 - 0.5272i 0.8438 - 1.2136i -1.1188 + 1.8326i 0.5235 - 0.7679i -1.5662 + 2.3464i 0.3373 - 0.3155i 0.8941 - 0.7089i -0.1817 + 0.6249i -0.5594 + 0.7645i 1.4625 - 2.3437i 0.8626 - 1.1220i -0.8538 + 1.3218i -0.2649 + 0.5924i 7.4823 -13.2073i -0.2647 + 0.6176i 0.4969 - 0.6898i 0.0006 - 0.0062i 0.4961 - 0.6819i 0.3370 - 0.3108i -0.5588 + 0.7562i 0.4627 - 0.7016i 0.4630 - 0.7074i 0.2141 - 0.2879i 2.9433 - 4.5851i 2.0563 - 3.1923i 3.0111 - 5.1251i 3.0144 - 5.1087i 1.5381 - 2.3267i 2.0508 - 3.2182i 0.0661 - 0.0482i 0.4555 - 0.6528i 1.4898 - 2.4223i 2.6556 - 3.5695i -2.1619 + 3.1902i 0.0484 - 0.0259i -1.5643 + 2.4677i 0.3030 - 0.4166i -0.8247 + 1.5661i -1.7360 + 2.8391i -2.3962 + 3.8572i 1.9295 - 3.1066i 2.5635 - 4.4059i 2.5679 - 4.3954i 1.4762 - 2.3250i 1.8014 - 2.9370i 1.9238 - 3.1211i 0.0994 - 0.0801i -2.2631 + 3.7958i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
p = 3×242
-0.0006 0.0009 0.0022 0.0025 -0.0025 -0.0023 -0.0022 -0.0016 -0.0023 -0.0023 -0.0019 0.0025 0.0023 0.0023 0.0018 0.0019 0.0019 0.0012 0 0.0016 -0.0019 -0.0009 0.0006 0.0011 -0.0002 0.0016 0.0017 0.0016 0.0016 0.0017 0.0016 0.0006 0.0015 0.0017 -0.0016 -0.0015 -0.0004 -0.0018 -0.0007 -0.0016 -0.0016 -0.0017 0.0012 0.0011 0.0011 0.0012 0.0012 0.0011 0.0004 -0.0012
0.0026 0.0024 0.0024 0.0017 0.0009 0.0024 0.0024 -0.0019 -0.0017 -0.0005 -0.0024 -0.0017 -0.0008 -0.0024 -0.0014 -0.0008 -0.0021 -0.0022 -0.0026 -0.0024 -0.0021 -0.0022 -0.0021 -0.0019 -0.0018 -0.0018 -0.0001 -0.0002 -0.0007 -0.0012 0.0006 0.0018 0.0018 0.0012 0.0018 0.0018 0.0019 0.0008 -0.0014 -0.0012 -0.0003 0.0007 -0.0001 -0.0002 -0.0005 -0.0009 0.0009 0.0004 0.0013 0.0005
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Plot the current distribution.
current(inductor,600e6)
Input Arguments
rfpcbobject
— PCB component object
RF PCB object
PCB component object, specified as an RF PCB object. For a complete list of the PCB components, microstrip bends, and traces, see PCB Components Catalog and Custom Geometry and PCB Fabrication.
frequency
— Frequency used to calculate current distribution
scalar
Frequency to calculate the current distribution, specified as a scalar in Hz.
Example: 70e6
Data Types: double
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: scale=log10
Scale
— Scale to visualize current distribution
linear (default) | string scalar | character vector
Scale to visualize the current distribution on the surface of the PCB
component, specified as a string or a character vector. The string
values are either 'linear'
, 'log'
,
or 'log10'
or as a function. You can specify any
mathematical function such as log
,
log10
, cos
, or
sin
.
Data Types: char
| function_handle
Slicer
— Slicer to focus on desired portion of current plot
'on'
| 'off'
Slicer to slice the current plot and focus on the desired portion,
specified as 'on'
or 'off'
.
Choosing 'on'
adds the slicer panel to the current
plot and choosing 'off'
does not change the current
plot.
Data Types: logical
Excitation
— Excitation using voltage source
function handle
Excitation using as voltage source, specified function handle from the
voltagePort
function.
Data Types: char
| function_handle
Type
— Choose component of metal current
absolute
(default) | real
| imaginary
Choose the component to display of the metal current, specified
as.absolute
, real
, or
imaginary
.
Data Types: char
| function_handle
Direction
— Visualize direction of vector when plotting metal current
off
(default) | on
Visualize the direction of the vector when plotting metal current,
specified as off
or on
.
Data Types: logical
Output Arguments
i
— x, y, z components of current distribution
3-by-n complex matrix in A/m
x, y, z components of the current distribution, returned as a 3-by-n complex matrix in A/m. The value of the current is calculated on every triangle mesh on the surface of the PCB component.
p
— Cartesian coordinates representing center of each triangle in mesh
3-by-n real matrix
Cartesian coordinates representing the center of each triangle in the mesh, returned as a 3-by-n real matrix.
Version History
Introduced in R2021b
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)