[High-intensity focused ultrasound simulator] Simulate high-intensity focused ultrasound beams and heating effects in layered media (Matlab code)…

?About the author: A Matlab simulation developer who loves scientific research. He cultivates his mind and improves his technology simultaneously. For cooperation on MATLAB projects, please send a private message.

Personal homepage: Matlab Research Studio

Personal credo: Investigate things to gain knowledge.

For more complete Matlab code and simulation customization content, click

Intelligent optimization algorithm Neural network prediction Radar communication Wireless sensor Power system

Signal processing Image processing Path planning Cellular automaton Drone

Content introduction

The High Intensity Focused Ultrasound Simulator is an advanced medical device used to simulate high intensity focused ultrasound beams and heating effects in layered media. This technology has a wide range of applications in the medical field and can be used to treat tumors, eliminate stones, and repair tissue damage.

High-intensity focused ultrasound beam is an energy-concentrated sound beam that can focus sound waves to a specific area by concentrating energy. This focusing effect can be used to treat tumors. By focusing high-intensity ultrasound beams on tumor tissue, the structure of tumor cells can be destroyed, thereby achieving the therapeutic effect. In addition, high-intensity focused ultrasound beams can also be used to eliminate stones. By focusing the energy on the stones, the stones can be broken up or dissolved. This technique is safer and non-invasive than traditional surgical methods.

In addition to focusing effects, the High Intensity Focused Ultrasound simulator can also simulate heating effects in layered media. When sound waves travel through a medium, they create friction, which creates heat. This heating effect can be used to repair tissue damage. By applying high-intensity ultrasound beams to injured tissues, blood circulation and metabolism can be promoted, thereby accelerating the tissue repair process.

High-intensity focused ultrasound simulators work by generating high-frequency sound waves and focusing them on specific areas. This equipment usually consists of an ultrasonic generator, a focuser and a control system. The ultrasonic generator is responsible for generating high-frequency sound waves, the focuser is used to focus the sound waves to a specific area, and the control system is used to control the intensity and focus position of the ultrasonic beam.

High-intensity focused ultrasound simulator has broad application prospects in the medical field. It can be used to treat a variety of diseases, such as tumors, stones, and tissue damage. Compared with traditional surgical methods, high-intensity focused ultrasound simulators have many advantages, such as non-invasive, safe and fast recovery. In addition, this technology can also be used to research and develop new treatments, providing more possibilities for medical research and clinical practice.

In summary, the High-Intensity Focused Ultrasound Simulator is an advanced medical device that can simulate high-intensity focused ultrasound beams and heating effects in layered media. It has broad application prospects in the medical field and has many advantages. With the continuous advancement of technology, it is believed that high-intensity focused ultrasound simulators will play a more important role in the future and make greater contributions to human health.

Part of the code

function [yplot]=prueba2(xpun,C,R,w)
xpun=[ones(1,size(xpun,2));xpun];
yplot=zeros(1,size(xpun,2));
for i=1:size(xpun,2)
    yplot(i)=0;
    for n=1:size(C,1)
        z=0;
        for a=1:size(xpun,1)
            z=z + (xpun(a,i)-C(n,a))^2/R^2;
        end
        yplot(i)=yplot(i) + w(n)*exp(-z);
    end
end

eval(['load ','''',[pathname,Xcalname,'''']])
factores=eval(strtok(Xcalname,'.'));
eval(['load ','''',[pathname,ycalname,'''']])
y_s=eval(strtok(ycalname,'.'));

Nresp=size(y_s,2);
Nf=size(factores,2);
w_s=w_s/sum(w_s);

eval(['load ','''',[pathname,netname,'''']])

for i=1:Nf
    x=factores(:,i);
    delta=(max(x)-min(x));
    MM=min(x) + max(x);
    x=(2*x-MM)/delta;
    eval(['x',int2str(i),'=x;'])
    eval(['delta',int2str(i),'f=delta;'])
    eval(['MM',int2str(i),'f=MM;'])
end

Nresp=size(y_s,2);
for i=1:Nresp
    y=y_s(:,i);
    delta=(max(y)-min(y));
    MM=min(y) + max(y);
    y=(2*y-MM)/delta;
    eval(['y',int2str(i),'=y;'])
    eval(['deltay',int2str(i),'=delta;'])
    eval(['MMy',int2str(i),'=MM;'])
end
for i_r=1:Nresp
    Yplot{i_r}=prueba2(xpun',C{i_r},R(i_r),w{i_r});
    eval(['Des',int2str(i_r),'=Yplot{',int2str(i_r),'};'])
end

for i_r=1:Nresp
    if isnan(lows(i_r))==1
        eval(['lows(',int2str(i_r),')=(min(Yplot{',int2str(i_r),'}*deltay',int2str(i_r),' + MMy\ ',int2str(i_r),')/2);'])
    end
    if isnan(highs(i_r))==1
        eval(['highs(',int2str(i_r),')=(max(Yplot{',int2str(i_r),'}*deltay',int2str(i_r),' + MMy\ ',int2str(i_r),')/2);'])
    end
    switchdecision(i_r)
        case 1
            eval(['Ycomp',int2str(i_r),'=(Yplot{',int2str(i_r),'}*deltay',int2str(i_r),' + MMy',int2str( i_r),')/2;'])
            eval(['Ytemp=Ycomp',int2str(i_r),';'])
            Dtemp=zeros(size(Ytemp));
            Dtemp(Ytemp<lows(i_r))=0;
            Dtemp(Ytemp>highs(i_r))=0;
            Dtemp(Ytemp>=lows(i_r) & amp; Ytemp<=highs(i_r))=...
                (Ytemp(Ytemp>=lows(i_r) & amp; Ytemp<=highs(i_r))-lows(i_r))/(highs(i_r)-lows(i_r));
            eval(['Des',int2str(i_r),'=Dtemp;'])
        case 2
            eval(['Ycomp',int2str(i_r),'=(Yplot{',int2str(i_r),'}*deltay',int2str(i_r),' + MMy',int2str( i_r),')/2;'])
            eval(['Ytemp=Ycomp',int2str(i_r),';'])
            Dtemp=zeros(size(Ytemp));
            Dtemp(Ytemp<lows(i_r))=0;
            Dtemp(Ytemp>highs(i_r))=0;
            Dtemp(Ytemp>=lows(i_r) & amp; Ytemp<=highs(i_r))=...
                (highs(i_r)-Ytemp(Ytemp>=lows(i_r) & amp; Ytemp<=highs(i_r)))/(highs(i_r)-lows(i_r));
            eval(['Des',int2str(i_r),'=Dtemp;'])
        case 3
            eval(['Ycomp',int2str(i_r),'=(Yplot{',int2str(i_r),'}*deltay',int2str(i_r),' + MMy',int2str( i_r),')/2;'])
            eval(['Ytemp=Ycomp',int2str(i_r),';'])
            Dtemp=zeros(size(Ytemp));
            Dtemp(Ytemp<lows(i_r))=0;
            Dtemp(Ytemp>highs(i_r))=0;
            Dtemp(Ytemp>=lows(i_r) & amp; Ytemp<=targets(i_r))=...
                (Ytemp(Ytemp>=lows(i_r) & amp; Ytemp<=targets(i_r))-lows(i_r))/(targets(i_r)-lows(i_r));
            Dtemp(Ytemp>targets(i_r) & amp; Ytemp<highs(i_r))=...
                (highs(i_r)-Ytemp(Ytemp>targets(i_r) & amp; Ytemp<highs(i_r)))/(highs(i_r)-targets(i_r));
            eval(['Des',int2str(i_r),'=Dtemp;'])
        case 4
            eval(['Ycomp',int2str(i_r),'=(Yplot{',int2str(i_r),'}*deltay',int2str(i_r),' + MMy',int2str( i_r),')/2;'])
            eval(['Ytemp=Ycomp',int2str(i_r),';'])
            Dtemp=ones(size(Ytemp));
            Dtemp(Ytemp<lows(i_r))=0;
            Dtemp(Ytemp>highs(i_r))=0;
            eval(['Des',int2str(i_r),'=Dtemp;'])
    end
    % Cleaning bad values
    eval(['Des',int2str(i_r),'(Des',int2str(i_r),'<0)=0;'])
    eval(['Des',int2str(i_r),'(Des',int2str(i_r),'>1)=1;'])
end

Des=1;
for i_r=1:Nresp
    eval(['Des=[Des.*(Des',int2str(i_r),'.^w_s(',int2str(i_r),'))];'])
end

% Restrictions on factors
% eval(['load Dmaxmin',int2str(Nf)])
xtempmax=linspace(0,1,15)';
xtempmin=linspace(1,0,15)';
f
    case 2
        dmax2=[kron(xtempmax,ones(15,1)),kron(ones(15,1),xtempmax)];
        dmin2=[kron(xtempmin,ones(15,1)),kron(ones(15,1),xtempmin)];
    case 3
        dmax3=[kron(xtempmax,kron(ones(15,1),ones(15,1))),...
            kron(ones(15,1),kron(xtempmax,ones(15,1))),...
            kron(ones(15,1),kron(ones(15,1),xtempmax))];
        dmin3=[kron(xtempmin,kron(ones(15,1),ones(15,1))),...
            kron(ones(15,1),kron(xtempmin,ones(15,1))),...
            kron(ones(15,1),kron(ones(15,1),xtempmin))];
    case 4
        dmax4=[kron(kron(xtempmax,kron(ones(15,1),ones(15,1))),ones(15,1)),...
            kron(kron(ones(15,1),kron(xtempmax,ones(15,1))),ones(15,1)),...
            kron(kron(ones(15,1),kron(ones(15,1),xtempmax)),ones(15,1)),...
            kron(kron(ones(15,1),kron(ones(15,1),ones(15,1))),xtempmax)];
        dmin4=[kron(kron(xtempmin,kron(ones(15,1),ones(15,1))),ones(15,1)),...
            kron(kron(ones(15,1),kron(xtempmin,ones(15,1))),ones(15,1)),...
            kron(kron(ones(15,1),kron(ones(15,1),xtempmin)),ones(15,1)),...
            kron(kron(ones(15,1),kron(ones(15,1),ones(15,1))),xtempmin)];
end
for i_f=1:Nf
    if isnan(lowsf(i_f))==1
        eval(['lowsf(',int2str(i_f),')=min(factores(:,',int2str(i_f),'));'])
    end
    if isnan(highsf(i_f))==1
        eval(['highsf(',int2str(i_f),')=max(factores(:,',int2str(i_f),'));'])
    end
    switch decisionsf(i_f)
        case 1
            eval(['Des=Des.*dmax',int2str(Nf),'(:,i_f)'';'])
        case 2
            eval(['Des=Des.*dmin',int2str(Nf),'(:,i_f)'';'])
        case 3
            dtargf=zeros(size(Des));
            eval(['xpunf=xpun(:,',int2str(i_f),');'])
            eval(['xpunf=(xpunf*delta',int2str(i_f),'f + MM',int2str(i_f),'f)/2;'])
            dtargf(xpunf>lowsf(i_f) & xpunf<=targetsf(i_f))=(xpunf(xpunf>lowsf(i_f) & i_f)-lowsf(i_f));
            dtargf(xpunf>targetsf(i_f) & xpunf<highsf(i_f))=(highsf(i_f)-xpunf(xpunf>targetsf(i_f) & -targetsf(i_f));
            Des=Des.*dtargf;
        case 4
            if lowsf(i_f)>min(factores(:,i_f)) & amp; & amp; highsf(i_f)<max(factores(:,i_f))
                dtargf=ones(size(Des));
                eval(['xpunf=xpun(:,',int2str(i_f),');'])
                eval(['xpunf=(xpunf*delta',int2str(i_f),'f + MM',int2str(i_f),'f)/2;'])
                dtargf(xpunf<lowsf(i_f))=0;
                dtargf(xpunf>highsf(i_f))=0;
                Des=Des.*dtargf;
            end
    end
end
[MaxDes,maxind]=max(Des);

Running results

[High Intensity Focused Ultrasound Simulator] Simulates high intensity focusing in layered media Ultrasonic beam and heating effect (Matlab code)_Drone

[High Intensity Focused Ultrasound Simulator] Simulates high intensity focusing in layered media Ultrasonic beam and heating effect (Matlab code)_Drone_02

[High Intensity Focused Ultrasound Simulator] Simulates high intensity focusing in layered media Ultrasonic beam and heating effect (Matlab code)_Drone_03

References

[1] Dai Suqin. Simulation study on heating of biological media by high-intensity focused ultrasound [D]. Hunan Normal University [2023-09-20]. DOI: 10.7666/d.Y2801213.

[2] Zhang Hailan. Positive and negative sound pressure amplitudes of high-intensity focused ultrasound sound field [C]//National and International Ultrasound Molecular Imaging and Biological Effects and Treatment Academic Conference. 2016.

[3] Liu Jia, Zhang Xiaodong, Rong Rong, et al. Relationship between temperature curve parameters and therapeutic effect of high-intensity focused ultrasound ablation of uterine fibroids under MR guidance [J]. Chinese Interventional Imaging and Therapeutics, 2018, 15(5): 5. DOI:10.13929/j.1672-8475.201711050.

Some theories are quoted from online literature. If there is any infringement, please contact the blogger to delete it
Follow me to receive massive matlab e-books and mathematical modeling materials

Complete private message code and data acquisition and paper data simulation for real customization

1 Improvement and application of various intelligent optimization algorithms
Production scheduling, economic scheduling, assembly line scheduling, charging optimization, workshop scheduling, departure optimization, reservoir scheduling, three-dimensional packing, logistics location selection, cargo space optimization, bus scheduling optimization, charging pile layout optimization, workshop layout optimization, Container ship stowage optimization, water pump combination optimization, medical resource allocation optimization, facility layout optimization, visible area base station and drone site selection optimization
2 Machine learning and deep learning
Convolutional neural network (CNN), LSTM, support vector machine (SVM), least squares support vector machine (LSSVM), extreme learning machine (ELM), kernel extreme learning machine (KELM), BP, RBF, width Learning, DBN, RF, RBF, DELM, XGBOOST, TCN realize wind power prediction, photovoltaic prediction, battery life prediction, radiation source identification, traffic flow prediction, load prediction, stock price prediction, PM2.5 concentration prediction, battery health status prediction, water body Optical parameter inversion, NLOS signal identification, accurate subway parking prediction, transformer fault diagnosis
2. Image processing
Image recognition, image segmentation, image detection, image hiding, image registration, image splicing, image fusion, image enhancement, image compressed sensing
3 Path planning
Traveling salesman problem (TSP), vehicle routing problem (VRP, MVRP, CVRP, VRPTW, etc.), UAV three-dimensional path planning, UAV collaboration, UAV formation, robot path planning, raster map path planning , multimodal transportation problems, vehicle collaborative UAV path planning, antenna linear array distribution optimization, workshop layout optimization
4 UAV application
UAV path planning, UAV control, UAV formation, UAV collaboration, UAV task allocation, and online optimization of UAV safe communication trajectories
5 Wireless sensor positioning and layout
Sensor deployment optimization, communication protocol optimization, routing optimization, target positioning optimization, Dv-Hop positioning optimization, Leach protocol optimization, WSN coverage optimization, multicast optimization, RSSI positioning optimization
6 Signal processing
Signal recognition, signal encryption, signal denoising, signal enhancement, radar signal processing, signal watermark embedding and extraction, EMG signal, EEG signal, signal timing optimization
7 Power system aspects
Microgrid optimization, reactive power optimization, distribution network reconstruction, energy storage configuration
8 Cellular Automata
Traffic flow, crowd evacuation, virus spread, crystal growth
9 Radar
Kalman filter tracking, track correlation, track fusion