Main Content

current

Calculate and plot current distribution

Since R2021b

Description

example

current(rfpcbobject,frequency) calculates and plots the absolute value of the current on the metal surface of a PCB component at the specified frequency.

i = current(rfpcbobject,frequency) calculates the x, y, z components of the current on the surface of a PCB component at a specified frequencies.

example

[i,p] = current(rfpcbobject,frequency) returns the current distribution and the points at which the current calculation was performed.

current(rfpcbobject,frequency,'dielectric') calculates and plots the absolute value of the current at the specified frequency on the dielectric surface of the PCB component.

i = current(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(___,Name=Value) calculates the current on the surface of a PCB component using additional name-value arguments.

Examples

collapse all

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')

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.6242 + 2.4761i  -1.2470 + 1.9452i  -0.8583 + 1.1427i  -0.0003 + 0.0074i   0.0000 - 0.0068i  -1.4746 + 2.3132i   1.5843 - 2.2355i   0.0625 - 1.1177i   2.1642 - 2.8379i   0.1596 - 0.2215i  11.3324 -14.1532i  -0.0005 + 0.0075i  -0.2746 + 0.5833i   2.3128 - 3.6264i   0.8333 - 1.3715i   2.3114 - 3.6033i   0.3534 - 0.6943i   1.5569 - 2.2834i   2.8535 - 4.0297i   0.0022 - 0.0279i   1.2876 - 2.2287i   1.2904 - 2.2862i   2.6134 - 4.0785i   1.1201 - 1.5116i   0.1377 - 0.2381i   4.2749 - 8.0680i   3.2646 - 6.0450i   1.1279 - 1.9148i   0.8334 - 1.3664i   0.0198 - 0.2047i   0.0770 - 0.2905i  -1.4594 + 2.1643i   1.5838 - 2.1216i   2.0882 - 3.4221i   1.0701 - 1.5717i   3.1778 - 5.9529i   2.5690 - 4.6785i   1.4193 - 2.4219i   1.0411 - 1.7222i   0.1083 - 0.3294i   0.0604 - 0.2525i  -1.7421 + 2.8979i   0.2335 - 0.3627i  -1.0718 + 1.6400i   0.2437 - 0.1946i  -2.0250 + 3.3219i   2.0832 - 3.4549i   0.3779 - 0.6739i   1.4578 - 2.4218i   1.9807 - 3.4078i
  -0.0000 + 0.0054i   0.0453 - 0.0484i   0.2484 - 0.4503i   0.8372 - 1.2021i  -1.0527 + 1.7418i   0.4221 - 0.6209i  -1.6809 + 2.5032i   0.3402 - 0.3212i   0.9973 - 0.8706i  -0.2554 + 0.7346i   0.3399 - 0.3165i   1.4634 - 2.3446i   0.8633 - 1.1231i  -0.8518 + 1.3186i  -0.2589 + 0.5838i  -0.2587 + 0.6089i   0.4934 - 0.6779i   0.4942 - 0.6858i   0.0006 - 0.0062i  -0.5578 + 0.7619i  -0.5572 + 0.7536i   0.4565 - 0.6927i   0.4568 - 0.6985i   0.2082 - 0.2801i   2.9332 - 4.5620i   1.9943 - 3.1060i   3.0076 - 5.1189i   3.0109 - 5.1025i   1.5415 - 2.3309i   1.9889 - 3.1324i   1.5851 - 2.5704i   1.5363 - 1.9820i  -1.5071 + 2.2979i   0.2667 - 0.3625i  -0.7541 + 1.4537i   1.9573 - 3.1426i   2.5690 - 4.4116i   2.5734 - 4.4012i   1.4429 - 2.2788i   1.7052 - 2.7973i   1.9516 - 3.1568i   0.0754 - 0.0484i  -2.3820 + 3.9716i   0.2232 - 0.0544i  -1.0929 + 1.7706i   0.0391 + 0.0011i   0.2794 - 0.4080i  -1.4315 + 2.3511i   1.0888 - 1.8248i   1.7757 - 3.2453i
   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.0016    0.0012         0   -0.0019   -0.0009    0.0006    0.0011   -0.0002    0.0016    0.0017    0.0016    0.0016    0.0017    0.0016    0.0017   -0.0016   -0.0015   -0.0007   -0.0016    0.0012    0.0011    0.0011    0.0012    0.0012    0.0011    0.0004   -0.0012   -0.0011   -0.0010   -0.0003   -0.0005   -0.0011    0.0007    0.0006
    0.0026    0.0024    0.0024    0.0017    0.0009    0.0024    0.0024   -0.0019   -0.0017   -0.0005   -0.0021   -0.0017   -0.0008   -0.0024   -0.0014   -0.0021   -0.0024   -0.0022   -0.0026   -0.0024   -0.0022   -0.0021   -0.0019   -0.0018   -0.0018   -0.0001   -0.0002   -0.0007   -0.0012    0.0006    0.0012    0.0018    0.0018   -0.0014   -0.0012   -0.0001   -0.0002   -0.0005   -0.0009    0.0009    0.0004    0.0013    0.0005    0.0012    0.0013    0.0014   -0.0009   -0.0008   -0.0007   -0.0003
         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

collapse all

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 to calculate the current distribution, specified as a scalar in Hz.

Example: 70e6

Data Types: double

Name-Value Arguments

Example: scale=log10

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 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 using as voltage source, specified function handle from the voltagePort function.

Data Types: char | function_handle

Choose the component to display of the metal current, specified as.absolute, real, or imaginary.

Data Types: char | function_handle

Visualize the direction of the vector when plotting metal current, specified as off or on.

Data Types: logical

Output Arguments

collapse all

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.

Cartesian coordinates representing the center of each triangle in the mesh, returned as a 3-by-n real matrix.

Version History

Introduced in R2021b