亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? invkine_codepad.m

?? 模糊控制工具箱,很好用的,有相應(yīng)的說(shuō)明文件,希望對(duì)大家有用!
?? M
字號(hào):
%% Modeling Inverse Kinematics in a Robotic Arm
% This demo illustrates using a fuzzy system to model the inverse
% kinematics in a two-joint robotic arm.
%
% Copyright 1994-2005 The MathWorks, Inc.
%
%
%% What is Inverse Kinematics?
% Kinematics is the science of motion. In a two-joint robotic arm, given
% the angles of the joints, the kinematics equations give the location of
% the tip of the arm. Inverse kinematics refers to the reverse process.
% Given a desired location for the tip of the robotic arm, what should the
% angles of the joints be so as to locate the tip of the arm at the desired
% location. There is usually more than one solution and can at times be a
% difficult problem to solve.
%
% This is a typical problem in robotics that needs to be solved to control
% a robotic arm to perform tasks it is designated to do. In a
% 2-dimensional input space, with a two-joint robotic arm and given the
% desired co-ordinate, the problem reduces to finding the two angles
% involved. The first angle is between the first arm and the ground (or
% whatever it is attached to). The second angle is between the first arm
% and the second arm.
%
% <<invkine_angles.png>>
%%
% *Figure 1:* Illustration showing the two-joint robotic arm with the two
% angles, |theta1| and |theta2|
%
%% Why use Fuzzy logic?
% For simple structures like the two-joint robotic arm, it is possible to
% mathematically deduce the angles at the joints given the desired location
% of the tip of the arm. However with more complex structures (eg: n-joint
% robotic arms operating in a 3-dimensional input space) deducing a
% mathematical solution for the inverse kinematics may prove challenging.
%
% Using fuzzy logic, we can construct a Fuzzy Inference System that deduces
% the inverse kinematics if the forward kinematics of the problem is
% known, hence sidestepping the need to develop an analytical solution.
% Also, the fuzzy solution is easily understandable and does not require
% special background knowledge to comprehend and evaluate it.
%
% In the following section, a broad outline for developing such a
% solution is described, and later, the detailed steps are elaborated.
%
%% Overview of Fuzzy Solution
%
% Since the forward kinematics formulae for the two-joint robotic arm are
% known, x and y co-ordinates of the tip of the arm are deduced for the
% entire range of angles of rotation of the two joints. The co-ordinates
% and the angles are saved to be used as training data to train ANFIS
% (Adaptive Neuro-Fuzzy Inference System) network. 
%
% During training the ANFIS network learns to map the co-ordinates |(x,y)|
% to the angles |(theta1, theta2)|. The trained ANFIS network is then used
% as a part of a larger control system to control the robotic arm. Knowing
% the desired location of the robotic arm, the control system uses the
% trained ANFIS network to deduce the angular positions of the joints and
% applies force to the joints of the robotic arm accordingly to move it to
% the desired location. 
%
%% What is ANFIS?
% ANFIS stands for Adaptive Neuro-Fuzzy Inference System. It is a hybrid
% neuro-fuzzy technique that brings learning capabilities of neural
% networks to fuzzy inference systems. The learning algorithm tunes the
% membership functions of a
% <matlab:helpview([docroot,'/toolbox/fuzzy/fuzzy.map'],'sugeno_type_fis') Sugeno-type Fuzzy Inference System> 
% using the training input-output data. 
%
% In this case, the input-output data refers to the "coordinates-angles"
% dataset. The coordinates act as input to the ANFIS and the angles act as
% the output. The learning algorithm "teaches" the ANFIS to map the
% co-ordinates to the angles through a process called training. At the end
% of training, the trained ANFIS network would have learned the
% input-output map and be ready to be deployed into the larger control
% system solution.
%
%% Data Generation
% Let |theta1| be the angle between the first arm and the ground. Let
% |theta2| be the angle between the second arm and the first arm (Refer to
% Figure 1 for illustration). Let the length of the first arm be |l1| and
% that of the second arm be |l2|. 
%
% Let us assume that the first joint has limited freedom to rotate and it
% can rotate between 0 and 90 degrees. Similarly, assume that the second
% joint has limited freedom to rotate and can rotate between 0 and 180
% degrees. (This assumption takes away the need to handle some special
% cases which will confuse the discourse). Hence, |0<=theta1<=pi/2| and
% |0<=theta2<=pi|.
%
% <<invkine_all_angles.png>>
%%
% *Figure 2:* Illustration showing all possible |theta1| and |theta2|
% values.
%
% Now, for every combination of |theta1| and |theta2| values the x and y
% coordinates are deduced using forward kinematics formulae.
%%
% The following code snippet shows how data is generated for all
% combination of |theta1| and |theta2| values and saved into a matrix to be
% used as training data. The reason for saving the data in two matrices is
% explained in the following section.

l1 = 10; % length of first arm
l2 = 7; % length of second arm

theta1 = 0:0.1:pi/2; % all possible theta1 values
theta2 = 0:0.1:pi; % all possible theta2 values

[THETA1, THETA2] = meshgrid(theta1, theta2); % generate a grid of theta1 and theta2 values

X = l1 * cos(THETA1) + l2 * cos(THETA1 + THETA2); % compute x coordinates
Y = l1 * sin(THETA1) + l2 * sin(THETA1 + THETA2); % compute y coordinates

data1 = [X(:) Y(:) THETA1(:)]; % create x-y-theta1 dataset
data2 = [X(:) Y(:) THETA2(:)]; % create x-y-theta2 dataset

%%
% <matlab:edit('traininv') Click here for unvectorized code>
%%
% The following plot shows all the X-Y data points generated by cycling
% through different combinations of |theta1| and |theta2| and deducing x
% and y co-ordinates for each. The plot can be generated by using the
% code-snippet shown below. The plot is illustrated further for easier
% understanding.
%
%    plot(X(:), Y(:), 'r.'); 
%    axis equal;
%    xlabel('X')
%    ylabel('Y')
%    title('X-Y co-ordinates generated for all theta1 and theta2 combinations using forward kinematics formulae')
%
% <<invkine_grid2.png>>
%
%%
% *Figure 3:* X-Y co-ordinates generated for all |theta1| and |theta2|
% combinations using forward kinematics formulae
%
%% Building ANFIS networks
% One approach to building an ANFIS solution for this problem, is to build
% two ANFIS networks, one to predict |theta1| and the other to predict
% |theta2|.
%
% In order for the ANFIS networks to be able to predict the angles they have
% to be trained with sample input-output data. The first ANFIS network will
% be trained with X and Y coordinates as input and corresponding |theta1|
% values as output. The matrix |data1| contains the |x-y-theta1| dataset
% required to train the first ANFIS network. Therefore |data2| will be used
% as the dataset to train the first ANFIS network. 
%
% Similarly, the second ANFIS network will be trained with X and Y
% coordinates as input and corresponding |theta2| values as output. The
% matrix |data2| contains the |x-y-theta2| dataset required to train the
% second ANFIS network. Therefore |data1| will be used as the dataset to
% train the second ANFIS network. 
%
% |anfis| is the function that is used to train an ANFIS network. There are
% several syntaxes to the function. If called with the following syntax,
% |anfis| automatically creates a Sugeno-type FIS and trains it using the
% training data passed to the function.

anfis1 = anfis(data1, 7, 150, [0,0,0,0]); % train first ANFIS network
anfis2 = anfis(data2, 6, 150, [0,0,0,0]); % train second ANFIS network

%%
% The first parameter to |anfis| is the training data, the second parameter
% is the number of membership functions used to characterize each input and
% output, the third parameter is the number of training <#23 epochs> and
% the last parameter is the options to display progress during training.
% The values for number of epochs and the number of membership functions
% have been arrived at after a fair amount of experimentation with
% different values.
%
% The toolbox comes with GUI's that helps build and experiment with ANFIS
% networks.
%
% |anfis1| and |anfis2| represent the two trained ANFIS networks that
% will be deployed in the larger control system.
%
% Once the training is complete, the two ANFIS networks would have learned
% to approximate the angles (|theta1, theta2|) as a function of the
% coordinates (|x, y|). One advantage of using the fuzzy approach is that
% the ANFIS network would now approximate the angles for coordinates that
% are similar but not exactly the same as it was trained with. For example,
% the trained ANFIS networks are now capable of approximating the angles
% for coordinates that lie between two points that were included in the
% training dataset. This will allow the final controller to move the arm
% smoothly in the input space. 
% 
% We now have two trained ANFIS networks which are ready to be deployed
% into the larger system that will utilize these networks to control the
% robotic arms.
% 
%% Validating the ANFIS networks
% 
% Having trained the networks, an important follow up step is to validate the
% networks to determine how well the ANFIS networks would perform inside
% the larger control system.
%
% Since this demo problem deals with a two-joint robotic arm whose inverse
% kinematics formulae can be derived, it is possible to test the answers
% that the ANFIS networks produce with the answers from the derived
% formulae.
%
% Let's assume that it is important for the ANFIS networks to have low
% errors within the operating range |0<x<2| and |8<y<10|.
%

x = 0:0.1:2; % x coordinates for validation
y = 8:0.1:10; % y coordinates for validation

%%
% The |theta1| and |theta2| values are deduced mathematically from the x
% and y coordinates using inverse kinematics formulae.

[X, Y] = meshgrid(x,y);

c2 = (X.^2 + Y.^2 - l1^2 - l2^2)/(2*l1*l2);
s2 = sqrt(1 - c2.^2);
THETA2D = atan2(s2, c2); % theta2 is deduced

k1 = l1 + l2.*c2;
k2 = l2*s2;
THETA1D = atan2(Y, X) - atan2(k2, k1); % theta1 is deduced

%%
% <matlab:edit('traininv') Click here for unvectorized code>
%%
% |THETA1D| and |THETA2D| are the variables that hold the values of
% |theta1| and |theta2| deduced using the inverse kinematics formulae.
%
% |theta1| and |theta2| values predicted by the trained anfis networks
% are obtained by using the command |evalfis| which evaluates a FIS for the
% given inputs.
%
% Here, |evalfis| is used to find out the FIS outputs for the same x-y
% values used earlier in the inverse kinematics formulae.

XY = [X(:) Y(:)];
THETA1P = evalfis(XY, anfis1); % theta1 predicted by anfis1
THETA2P = evalfis(XY, anfis2); % theta2 predicted by anfis2

%%
% Now, we can see how close the FIS outputs are with respect to the
% deduced values.

theta1diff = THETA1D(:) - THETA1P;
theta2diff = THETA2D(:) - THETA2P;

subplot(2,1,1);
plot(theta1diff);
ylabel('THETA1D - THETA1P')
title('Deduced theta1 - Predicted theta1')

subplot(2,1,2);
plot(theta2diff);
ylabel('THETA2D - THETA2P')
title('Deduced theta2 - Predicted theta2')

%%
% The errors are in the |1e-3| range which is a fairly good number for the
% application it is being used in. However this may not be acceptable for
% another application, in which case the parameters to the |anfis| function
% may be tweaked until an acceptable solution is arrived at. Also, other
% techniques like input selection and alternate ways to model the problem
% may be explored.

%% Building a solution around the trained ANFIS networks
%
% Now given a specific task, such as robots picking up an object in an
% assembly line, the larger control system will use the trained ANFIS
% networks as a reference, much like a lookup table, to determine what the
% angles of the arms must be, given a desired location for the tip of the
% arm. Knowing the desired angles and the current angles of the joints, 
% the system will apply force appropriately on the joints of the arms to
% move them towards the desired location.
%
% The GUI demo |invkine| demonstrates how the two trained ANFIS networks
% have been used to trace an ellipse in the input space. 

invkine

%%
% The two ANFIS networks used in the demo have been pre-trained and are
% deployed into a larger system that controls the tip of the two-joint
% robot arm to trace an ellipse in the input space.
%
% The ellipse to be traced can be moved around. Move the ellipse to a
% slightly different location and observe how the system responds by moving
% the tip of the robotic arm from its current location to the closest
% point on the new location of the ellipse. Also observe that the system
% responds smoothly as long as the ellipse to be traced lies within the 'x'
% marked spots which represent the data grid that was used to train the
% networks. Once the ellipse is moved outside the range of data it was
% trained with, the ANFIS networks respond unpredictably. This emphasizes
% the importance of having relevant and representative data for training.
% Data must be generated based on the expected range of operation to avoid
% such unpredictability and instability issues.
%
%

%% Conclusion
% This demo illustrated using ANFIS to solve an inverse kinematics problem.
% Fuzzy logic has also found numerous other applications in other areas of
% technology like non-linear control, automatic control, signal processing,
% system identification, pattern recognition, time series prediction, data
% mining, financial applications etc.,
%
% Explore other demos and the documentation for more insight into fuzzy
% logic and its applications.
%
%% Glossary
% *ANFIS* - Adaptive Neuro-Fuzzy Inference System. a technique for
% automatically tuning Sugeno-type inference systems based on training data.
%
% *membership functions* - a function that specifies the degree to which a
% given input belongs to a set or is related to a concept.
%
% *input space* - it is a term used to define the range of all possible
% values
%
% *FIS* - Fuzzy Inference System. The overall name for a system that uses
% fuzzy reasoning to map an input space to an output space.
%
% *epochs* - 1 epoch of training represents one complete presentation of
% all the samples/datapoints/rows of the training dataset to the FIS. The
% inputs of each sample are presented and the FIS outputs are computed
% which are compared with the desired outputs to compute the error between
% the two. The parameters of the membership functions are then tuned to
% reduce the error between the desired output and the actual FIS output.
%


displayEndOfDemoMessage(mfilename)

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线免费不卡电影| xnxx国产精品| 色婷婷综合中文久久一本| 成人深夜福利app| 成人亚洲精品久久久久软件| 国产成人精品免费一区二区| 国产在线不卡视频| 国产精品亚洲а∨天堂免在线| 国产专区综合网| 国产91在线观看丝袜| 成人国产精品免费观看视频| 成人精品小蝌蚪| 99精品视频一区二区| 99久久精品免费看国产免费软件| 成人av资源站| 日本道精品一区二区三区| 欧美日韩视频在线观看一区二区三区| 欧美日韩国产电影| 日韩免费高清av| 久久久噜噜噜久久人人看 | 欧美中文字幕一区二区三区亚洲| 99re成人精品视频| 欧美做爰猛烈大尺度电影无法无天| 在线观看国产精品网站| 777xxx欧美| 久久免费电影网| 亚洲三级电影全部在线观看高清| 亚洲乱码国产乱码精品精的特点 | 国产精品免费视频一区| 最近中文字幕一区二区三区| 一级日本不卡的影视| 亚洲卡通动漫在线| 日韩影院免费视频| 国产在线精品一区二区不卡了 | 一本到三区不卡视频| 欧美三级电影在线看| 日韩免费观看2025年上映的电影 | 午夜精品视频一区| 麻豆精品精品国产自在97香蕉| 美女精品一区二区| 成人小视频免费观看| 欧美日韩亚洲丝袜制服| 欧美一区二区日韩| 国产精品久久久久久久久免费相片| 亚洲免费毛片网站| 美女一区二区久久| 国产成+人+日韩+欧美+亚洲| 91欧美激情一区二区三区成人| 777亚洲妇女| 国产精品美女久久久久久久网站| 亚洲成人激情自拍| 国产麻豆91精品| 日本久久一区二区| 26uuu久久综合| 亚洲专区一二三| 国产一区二区不卡老阿姨| 色域天天综合网| 亚洲精品一区二区三区蜜桃下载| 国产欧美日韩综合精品一区二区| 亚洲福中文字幕伊人影院| 国产一区高清在线| 欧美三级韩国三级日本一级| 国产欧美视频一区二区| 日韩高清在线不卡| 91在线免费看| 久久久久97国产精华液好用吗| 亚洲1区2区3区视频| 国产福利视频一区二区三区| 欧美丰满美乳xxx高潮www| 欧美韩国一区二区| 久久91精品国产91久久小草 | 国产伦理精品不卡| 欧美艳星brazzers| 国产欧美一区二区精品忘忧草| 日韩av在线发布| 欧美性猛交xxxxxx富婆| 综合婷婷亚洲小说| 国产高清精品网站| 精品第一国产综合精品aⅴ| 亚洲一级不卡视频| 一本久道久久综合中文字幕 | 成人免费在线视频| 国产一区二区在线观看免费| 欧美另类一区二区三区| 综合av第一页| 国产a级毛片一区| 日韩精品一区二区三区四区| 日韩激情一区二区| 欧美伊人久久久久久午夜久久久久| 国产精品三级视频| 国产91精品免费| 久久夜色精品一区| 国产美女一区二区| 久久蜜桃一区二区| 国产麻豆精品theporn| 精品剧情v国产在线观看在线| 秋霞国产午夜精品免费视频 | 亚洲一区在线视频| 色狠狠av一区二区三区| 综合激情网...| 色综合色综合色综合色综合色综合 | 日本中文字幕不卡| 欧美美女bb生活片| 亚洲成人www| 欧美人伦禁忌dvd放荡欲情| 亚洲午夜羞羞片| 欧美高清视频在线高清观看mv色露露十八 | 久久亚洲二区三区| 国产成人免费9x9x人网站视频| 欧美成人官网二区| 激情欧美一区二区| 欧美激情一区二区在线| www.av精品| 一区二区三区视频在线观看| 欧美自拍偷拍午夜视频| 亚洲电影在线免费观看| 欧美精品免费视频| 美女脱光内衣内裤视频久久影院| 日韩午夜av一区| 国产麻豆视频精品| 欧美国产1区2区| 91麻豆国产在线观看| 亚洲精品成a人| 欧美久久久久久久久久| 热久久一区二区| 久久综合中文字幕| 成人精品gif动图一区| 夜夜嗨av一区二区三区四季av| 在线免费视频一区二区| 午夜欧美2019年伦理| 日韩一区二区三区在线视频| 免费在线观看精品| 精品国产91久久久久久久妲己| 欧美国产在线观看| 91网页版在线| 日韩av电影天堂| 国产亚洲精品免费| 91麻豆高清视频| 日韩精品一级二级| 国产日韩一级二级三级| 91色在线porny| 蜜桃传媒麻豆第一区在线观看| 国产视频一区二区在线| 在线观看成人小视频| 麻豆精品久久精品色综合| 中文av字幕一区| 欧美美女激情18p| 国产suv精品一区二区6| 亚洲一区在线播放| 欧美不卡123| 一本色道久久综合精品竹菊| 蜜桃一区二区三区在线观看| 日本一区二区三区在线观看| 在线视频欧美区| 国产精品91一区二区| 亚洲国产精品天堂| 欧美激情综合五月色丁香| 欧美日本在线播放| va亚洲va日韩不卡在线观看| 日韩精品欧美精品| 最新中文字幕一区二区三区| 日韩三级视频在线看| 91麻豆国产福利在线观看| 黄色小说综合网站| 亚洲一区在线免费观看| 国产蜜臀97一区二区三区| 91精品国产91久久久久久最新毛片| 国产成a人亚洲| 久久精品国产亚洲aⅴ| 亚洲国产中文字幕| 国产精品视频九色porn| 日韩欧美不卡在线观看视频| 欧美亚洲一区二区在线观看| 国产成人午夜高潮毛片| 另类欧美日韩国产在线| 亚洲午夜精品网| 国产精品亲子伦对白| 日韩欧美国产小视频| 欧美午夜精品免费| 99久久99久久综合| 日韩欧美激情一区| 在线亚洲免费视频| 99精品视频中文字幕| 国产精品一区二区三区四区| 视频一区二区欧美| 亚洲.国产.中文慕字在线| 亚洲欧美另类小说| 国产精品午夜在线观看| 精品国产三级电影在线观看| 欧美精品亚洲一区二区在线播放| 91视频xxxx| 99久久国产免费看| 成人av网站在线| 国产91清纯白嫩初高中在线观看 | 欧美日韩国产电影| 91精彩视频在线观看| 91女厕偷拍女厕偷拍高清| 成人性色生活片| 成人影视亚洲图片在线| 成人综合在线观看|